Class: PunkyBrewster::BeerListRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/punky_brewster/beer_list_request.rb

Constant Summary collapse

URL =
"http://www.punkybrewster.co.nz"

Instance Method Summary collapse

Instance Method Details

#beersObject



12
13
14
# File 'lib/punky_brewster/beer_list_request.rb', line 12

def beers
  response.beers
end

#responseObject



7
8
9
10
# File 'lib/punky_brewster/beer_list_request.rb', line 7

def response
  raw_response = Net::HTTP.get_response(URI(URL))
  BeerListResponse.new(raw_response)
end