Class: FlexmlsApi::Models::TourOfHome
- Extended by:
- Subresource
- Defined in:
- lib/flexmls_api/models/tour_of_home.rb
Constant Summary
Constants included from Paginate
Instance Attribute Summary
Attributes inherited from Base
#attributes, #changed, #errors
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ TourOfHome
constructor
A new instance of TourOfHome.
Methods included from Subresource
build_subclass, find_by_id, find_by_listing_key
Methods inherited from Base
#connection, connection, count, element_name, element_name=, first, get, #load, #method_missing, #parse_id, path, prefix, prefix=, #respond_to?
Methods included from Paginate
#collect, #paginate, #per_page
Constructor Details
#initialize(attributes = {}) ⇒ TourOfHome
Returns a new instance of TourOfHome.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/flexmls_api/models/tour_of_home.rb', line 11 def initialize(attributes={}) # Transform the date strings unless attributes['Date'].nil? date = Date.parse(attributes['Date']) attributes['Date'] = date attributes['StartTime'] = Time.parse("#{date}T#{attributes['StartTime']}") unless attributes['StartTime'].nil? attributes['EndTime'] = Time.parse("#{date}T#{attributes['EndTime']}") unless attributes['EndTime'].nil? end super(attributes) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FlexmlsApi::Models::Base