Class: Rentjuicer::Neighborhoods

Inherits:
Object
  • Object
show all
Defined in:
lib/rentjuicer/neighborhoods.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject

Returns the value of attribute client.



4
5
6
# File 'lib/rentjuicer/neighborhoods.rb', line 4

def client
  @client
end

#resourceObject

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