Sha256: 6021d4668450d930aa6b7bf6316a3dcfb2d6e460180a1da0e6b244947cdb83dd

Contents?: true

Size: 1.02 KB

Versions: 41

Compression:

Stored size: 1.02 KB

Contents

class MLS::Region < MLS::Resource

  property :id,             Fixnum, :serialize => :if_present
  property :name,           String, :serialize => :if_present
  property :common_name,    String, :serialize => :if_present
  property :description,    String, :serialize => :if_present
  property :code,           String, :serialize => :if_present
  property :type,           String, :serialize => :if_present
  property :source,         String, :serialize => :if_present
  property :minimum_zoom,   Fixnum, :serialize => :if_present
  property :maximum_zoom,   Fixnum, :serialize => :if_present
  property :slug,           String, :serialize => false
  property :geometry,       Hash,   :serialize => false
  property :envelope,       Hash,   :serialize => false
  
  # Counter caches
  property :listings_count, Fixnum, :serialize => :false

  class << self
    
    def find(id)
      response = MLS.get("/regions/#{id}")
      MLS::Region::Parser.parse(response.body)
    end
    
  end

end


class MLS::Region::Parser < MLS::Parser

end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
mls-0.2.21 lib/mls/models/region.rb
mls-0.2.20 lib/mls/models/region.rb
mls-0.2.19 lib/mls/models/region.rb
mls-0.2.18 lib/mls/models/region.rb
mls-0.2.17 lib/mls/models/region.rb
mls-0.2.16 lib/mls/models/region.rb
mls-0.2.15 lib/mls/models/region.rb
mls-0.2.14 lib/mls/models/region.rb
mls-0.2.13 lib/mls/models/region.rb
mls-0.2.12 lib/mls/models/region.rb
mls-0.2.11 lib/mls/models/region.rb
mls-0.2.9.1 lib/mls/models/region.rb
mls-0.2.10 lib/mls/models/region.rb
mls-0.2.9 lib/mls/models/region.rb
mls-0.2.8.2 lib/mls/models/region.rb
mls-0.2.8.1 lib/mls/models/region.rb
mls-0.2.8 lib/mls/models/region.rb
mls-0.2.7 lib/mls/models/region.rb
mls-0.2.6 lib/mls/models/region.rb
mls-0.2.5 lib/mls/models/region.rb