Class: Hydrogen::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/hydrogen/request.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Request

Returns a new instance of Request.



5
6
7
# File 'lib/hydrogen/request.rb', line 5

def initialize(options={})
  @options = {:mash => true}.merge(options)
end

Instance Method Details

#perform_get(path, query = {}) ⇒ Object



10
11
12
13
# File 'lib/hydrogen/request.rb', line 10

def perform_get(path, query={})
  response = HTTParty.get("#{@options[:base_uri]}#{path}", :query => query)
  perform(response)
end