Method: TimeCalc::Diff#initialize
- Defined in:
- lib/time_calc/diff.rb
#initialize(from, to) ⇒ Diff
Note:
Typically you should prefer TimeCalc#- to create Diff.
Returns a new instance of Diff.
42 43 44 |
# File 'lib/time_calc/diff.rb', line 42 def initialize(from, to) @from, @to = coerce(try_unwrap(from), try_unwrap(to)).map(&Value.method(:wrap)) end |