Class: Orthoses::ActiveSupport::TimeWithZone
- Inherits:
-
Object
- Object
- Orthoses::ActiveSupport::TimeWithZone
- Defined in:
- lib/orthoses/active_support/time_with_zone.rb
Instance Method Summary collapse
-
#call ⇒ Object
Time <= (known Time) TimeWithZone <= (known TimeWithZone, known Time, core Time).
-
#initialize(loader) ⇒ TimeWithZone
constructor
A new instance of TimeWithZone.
Constructor Details
#initialize(loader) ⇒ TimeWithZone
Returns a new instance of TimeWithZone.
6 7 8 |
# File 'lib/orthoses/active_support/time_with_zone.rb', line 6 def initialize(loader) @loader = loader end |
Instance Method Details
#call ⇒ Object
Time <= (known Time) TimeWithZone <= (known TimeWithZone, known Time, core Time)
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/orthoses/active_support/time_with_zone.rb', line 12 def call store = @loader.call time_with_zone_store = store["ActiveSupport::TimeWithZone"] time_with_zone_store.body.replace(filter_decl(time_with_zone_store)) each_line_from_core_time_definition(store) do |line| time_with_zone_store << line end store end |