Method: TimeCalc::Sequence#initialize
- Defined in:
- lib/time_calc/sequence.rb
#initialize(from:, to: nil, step: nil) ⇒ Sequence
Note:
Prefer TimeCalc#to or TimeCalc#step for producing sequences.
Returns a new instance of Sequence.
32 33 34 35 36 |
# File 'lib/time_calc/sequence.rb', line 32 def initialize(from:, to: nil, step: nil) @from = Value.wrap(from) @to = to&.then(&Value.method(:wrap)) @step = step end |