Class: Booker::V4::Models::LocationDaySchedule
- Defined in:
- lib/booker/v4/models/location_day_schedule.rb
Constant Summary
Constants inherited from Model
Constants inherited from Model
Instance Attribute Summary collapse
-
#EndTime ⇒ Object
Returns the value of attribute EndTime.
-
#StartTime ⇒ Object
Returns the value of attribute StartTime.
-
#Weekday ⇒ Object
Returns the value of attribute Weekday.
Class Method Summary collapse
Methods included from Concerns::DateTimeConcern
#time_from_booker_datetime, #time_to_booker_datetime, #timezone_from_booker_offset!, #timezone_from_booker_timezone, #to_wday
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
#EndTime ⇒ Object
Returns the value of attribute EndTime.
5 6 7 |
# File 'lib/booker/v4/models/location_day_schedule.rb', line 5 def EndTime @EndTime end |
#StartTime ⇒ Object
Returns the value of attribute StartTime.
5 6 7 |
# File 'lib/booker/v4/models/location_day_schedule.rb', line 5 def StartTime @StartTime end |
#Weekday ⇒ Object
Returns the value of attribute Weekday.
5 6 7 |
# File 'lib/booker/v4/models/location_day_schedule.rb', line 5 def Weekday @Weekday end |
Class Method Details
.from_hash(hash) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/booker/v4/models/location_day_schedule.rb', line 9 def self.from_hash(hash) model = super model.Weekday = to_wday(model.Weekday) strftime_format = '%T' model.StartTime = model.StartTime.try(:strftime, strftime_format) model.EndTime = model.EndTime.try(:strftime, strftime_format) model end |