class LocalRealEstate::Listing
Attributes
address[RW]
bathrooms[RW]
bedrooms[RW]
cars[RW]
city[RW]
lot_size[RW]
price[RW]
sqft[RW]
state[RW]
url[RW]
Public Class Methods
all()
click to toggle source
# File lib/local_real_estate/listing.rb, line 20 def self.all @@all end
current_city()
click to toggle source
# File lib/local_real_estate/listing.rb, line 24 def self.current_city @@all[0].city end
new(address: nil, city: nil, state: nil, url: nil, price: nil, bedrooms: nil, bathrooms: nil, sqft: nil, cars: "none", lot_size: nil)
click to toggle source
# File lib/local_real_estate/listing.rb, line 6 def initialize(address: nil, city: nil, state: nil, url: nil, price: nil, bedrooms: nil, bathrooms: nil, sqft: nil, cars: "none", lot_size: nil) @address = address @city = city @state = state @url = url @price = price @bedrooms = bedrooms @bathrooms = bathrooms @sqft = sqft @cars = cars @lot_size = lot_size @@all << self end