Sha256: b5f3f0df6006e7e5ea95088796ae312200ea215140de96c4d70878cabd3fad9f
Contents?: true
Size: 671 Bytes
Versions: 9
Compression:
Stored size: 671 Bytes
Contents
require 'date' require 'time' module FlexmlsApi module Models class TourOfHome < Base extend Subresource self.element_name = "tourofhomes" 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 end end end
Version data entries
9 entries across 9 versions & 2 rubygems