Class: Booker::V5::Models::LocationHour
- Defined in:
- lib/booker/v5/models/location_hour.rb
Constant Summary
Constants inherited from Model
Constants inherited from Model
Instance Attribute Summary collapse
-
#close ⇒ Object
Returns the value of attribute close.
-
#open ⇒ Object
Returns the value of attribute open.
Class Method Summary collapse
Methods inherited from Model
constantize, from_list, #initialize, #to_hash, #to_json
Constructor Details
This class inherits a constructor from Booker::Model
Instance Attribute Details
#close ⇒ Object
Returns the value of attribute close.
5 6 7 |
# File 'lib/booker/v5/models/location_hour.rb', line 5 def close @close end |
#open ⇒ Object
Returns the value of attribute open.
5 6 7 |
# File 'lib/booker/v5/models/location_hour.rb', line 5 def open @open end |
Class Method Details
.from_hash(hash) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/booker/v5/models/location_hour.rb', line 7 def self.from_hash(hash) model = super model.open = Time.parse(model.open) if model.open model.close = Time.parse(model.close) if model.close model end |