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.44 lib/mls/models/region.rb
mls-0.2.43 lib/mls/models/region.rb
mls-0.2.42 lib/mls/models/region.rb
mls-0.2.41 lib/mls/models/region.rb
mls-0.2.40 lib/mls/models/region.rb
mls-0.2.39 lib/mls/models/region.rb
mls-0.2.38 lib/mls/models/region.rb
mls-0.2.37 lib/mls/models/region.rb
mls-0.2.36 lib/mls/models/region.rb
mls-0.2.35 lib/mls/models/region.rb
mls-0.2.34 lib/mls/models/region.rb
mls-0.2.33 lib/mls/models/region.rb
mls-0.2.32 lib/mls/models/region.rb
mls-0.2.31 lib/mls/models/region.rb
mls-0.2.29 lib/mls/models/region.rb
mls-0.2.28 lib/mls/models/region.rb
mls-0.2.26 lib/mls/models/region.rb
mls-0.2.25 lib/mls/models/region.rb
mls-0.2.24 lib/mls/models/region.rb
mls-0.2.23 lib/mls/models/region.rb