Class: Ldbws::ResponseTypes::Base
- Inherits:
-
Object
- Object
- Ldbws::ResponseTypes::Base
- Includes:
- ParsingFunctions
- Defined in:
- lib/ldbws/response_types/base.rb
Overview
Base class which defines most of the functionality required by subclasses.
Direct Known Subclasses
BaseStationBoard, CallingPoint, Coach, DepartureItem, DepartureItemWithDetails, Formation, LoadingCategory, Location, ServiceDetails, ServiceItem, ToiletAvailability
Instance Method Summary collapse
Methods included from ParsingFunctions
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(prop) ⇒ Object
15 16 17 |
# File 'lib/ldbws/response_types/base.rb', line 15 def method_missing(prop) @props.fetch(prop) end |
Instance Method Details
#to_h ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/ldbws/response_types/base.rb', line 19 def to_h @props.to_h do |k, v| [ k, Ldbws::Utils.deep_hashify_value(v), ] end end |