class TableStructure::Iterator::HeaderOptions
Attributes
context[R]
enabled[R]
enabled?[R]
step[R]
Public Class Methods
new(options)
click to toggle source
# File lib/table_structure/iterator.rb, line 9 def initialize(options) @enabled = !!options if options.is_a?(Hash) @context = options[:context] @step = options[:step] end validate end
Private Instance Methods
validate()
click to toggle source
# File lib/table_structure/iterator.rb, line 21 def validate if @step raise ::TableStructure::Error, ':step must be numeric.' unless @step.is_a?(Numeric) raise ::TableStructure::Error, ':step must be positive number.' unless @step.positive? end end