Class: Rentjuicer::Neighborhoods
- Inherits:
-
Object
- Object
- Rentjuicer::Neighborhoods
- Defined in:
- lib/rentjuicer/neighborhoods.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#resource ⇒ Object
Returns the value of attribute resource.
Instance Method Summary collapse
- #find_all(raise_error = false) ⇒ Object
- #find_all! ⇒ Object
-
#initialize(client) ⇒ Neighborhoods
constructor
A new instance of Neighborhoods.
Constructor Details
#initialize(client) ⇒ Neighborhoods
Returns a new instance of Neighborhoods.
6 7 8 9 |
# File 'lib/rentjuicer/neighborhoods.rb', line 6 def initialize(client) self.client = client self.resource = "/neighborhoods.json" end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
4 5 6 |
# File 'lib/rentjuicer/neighborhoods.rb', line 4 def client @client end |
#resource ⇒ Object
Returns the value of attribute resource.
4 5 6 |
# File 'lib/rentjuicer/neighborhoods.rb', line 4 def resource @resource end |
Instance Method Details
#find_all(raise_error = false) ⇒ Object
11 12 13 |
# File 'lib/rentjuicer/neighborhoods.rb', line 11 def find_all(raise_error = false) Response.new(self.client.process_get(resource), raise_error) end |
#find_all! ⇒ Object
15 16 17 |
# File 'lib/rentjuicer/neighborhoods.rb', line 15 def find_all! find_all(true) end |