Class: Lighthouse::Facilities::NearbyFacility
- Inherits:
-
Common::Base
- Object
- Common::Base
- Lighthouse::Facilities::NearbyFacility
- Includes:
- ActiveModel::Serializers::JSON
- Defined in:
- lib/lighthouse/facilities/nearby_facility.rb
Instance Attribute Summary
Attributes inherited from Common::Base
Instance Method Summary collapse
-
#initialize(fac) ⇒ NearbyFacility
constructor
A new instance of NearbyFacility.
Methods inherited from Common::Base
#changed, #changed?, #changes, default_sort, filterable_attributes, max_per_page, per_page, sortable_attributes
Constructor Details
#initialize(fac) ⇒ NearbyFacility
Returns a new instance of NearbyFacility.
16 17 18 19 20 21 22 |
# File 'lib/lighthouse/facilities/nearby_facility.rb', line 16 def initialize(fac) super(fac) self.id = fac['id'] self.min_time = fac['attributes']['min_time'] self.max_time = fac['attributes']['max_time'] end |