Class: Booker::V5::Models::LocationHour

Inherits:
Model
  • Object
show all
Defined in:
lib/booker/v5/models/location_hour.rb

Constant Summary

Constants inherited from Model

Model::CONSTANTIZE_MODULE

Constants inherited from Model

Model::CONSTANTIZE_MODULE

Instance Attribute Summary collapse

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

#closeObject

Returns the value of attribute close.



5
6
7
# File 'lib/booker/v5/models/location_hour.rb', line 5

def close
  @close
end

#openObject

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