Sha256: a2d685e3161b676977a6cc3eff9f1784cd3a56bd9c774179a857c821bc1d6a9f
Contents?: true
Size: 655 Bytes
Versions: 71
Compression:
Stored size: 655 Bytes
Contents
module SparkApi module Models class RentalCalendar < Base extend Subresource self.element_name="rentalcalendar" def initialize(attributes={}) # Transform the date strings unless attributes['StartDate'].nil? date = Date.parse(attributes['StartDate']) attributes['StartDate'] = date end unless attributes['EndDate'].nil? date = Date.parse(attributes['EndDate']) attributes['EndDate'] = date end super(attributes) end def include_date? (day) day >= self.StartDate && day <= self.EndDate end end end end
Version data entries
71 entries across 71 versions & 1 rubygems