Class: ActiveInTime::FacilityType
- Inherits:
-
Object
- Object
- ActiveInTime::FacilityType
- Defined in:
- lib/ait_connect/facility_type.rb
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
- #facility_type_category ⇒ Object
-
#id ⇒ Object
def fetch @json = @active_in_time.get(“timetables/##id”)[“timetable”] self end.
-
#initialize(active_in_time, json) ⇒ FacilityType
constructor
A new instance of FacilityType.
- #name ⇒ Object
Constructor Details
#initialize(active_in_time, json) ⇒ FacilityType
Returns a new instance of FacilityType.
5 6 7 |
# File 'lib/ait_connect/facility_type.rb', line 5 def initialize(active_in_time, json) @active_in_time, @json = active_in_time, json end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
3 4 5 |
# File 'lib/ait_connect/facility_type.rb', line 3 def json @json end |
Instance Method Details
#facility_type_category ⇒ Object
22 23 24 25 |
# File 'lib/ait_connect/facility_type.rb', line 22 def facility_type_category return nil if !@json["facility_type_category"] ActiveInTime::FacilityTypeCategory.new(@active_in_time, @json["facility_type_category"]) end |
#id ⇒ Object
def fetch
@json = @active_in_time.get("timetables/#{id}")["timetable"]
self
end
14 15 16 |
# File 'lib/ait_connect/facility_type.rb', line 14 def id @json["id"] end |
#name ⇒ Object
18 19 20 |
# File 'lib/ait_connect/facility_type.rb', line 18 def name @json["name"] end |