lib/mls/models/listing.rb in mls-0.2.12 vs lib/mls/models/listing.rb in mls-0.2.13

- old
+ new

@@ -1,9 +1,9 @@ class MLS::Listing < MLS::Resource STATES = %w(processing listed leased expired) - KINDS = %w(lease sublease coworking) + TYPES = %w(lease sublease coworking_space) SPACE_TYPES = %w(unit floor building) LEASE_TERMS = ['Full Service', 'NNN', 'Modified Gross'] RATE_UNITS = ['ft^2/year', 'ft^2/month', 'month', 'year', 'desk/month'] USES = ["Office", "Creative", "Loft", "Medical Office", "Flex Space", "R&D", "Office Showroom", "Industrial", "Retail"] SOURCE_TYPES = %w(website flyer) @@ -19,11 +19,11 @@ property :source_url, String property :source_type, String, :serialize => :if_present property :channel, String, :serialize => :if_present property :name, String - property :kind, String, :default => 'lease' + property :type, String, :default => 'lease' property :state, String, :default => 'listed' property :space_type, String, :default => 'unit' property :unit, String property :floor, Fixnum property :comments, String @@ -74,11 +74,17 @@ else address.avatar(size, protocol) end end + def lease? + type == 'lease' + end def sublease? - kind == 'sublease' + type == 'sublease' + end + def coworking? + type == 'coworking_space' end def leased? !leased_on.nil? end