Class: GMoney::GFRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/gmoney/gf_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, options = {}) ⇒ GFRequest

Returns a new instance of GFRequest.



5
6
7
8
9
10
11
12
13
# File 'lib/gmoney/gf_request.rb', line 5

def initialize(url, options = {})
  @url = url
  options.each do |key, value|
    self.send("#{key}=", value)
  end
  
  @method ||= :get
  @headers ||= {}
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



3
4
5
# File 'lib/gmoney/gf_request.rb', line 3

def body
  @body
end

#headersObject

Returns the value of attribute headers.



3
4
5
# File 'lib/gmoney/gf_request.rb', line 3

def headers
  @headers
end

#methodObject

Returns the value of attribute method.



3
4
5
# File 'lib/gmoney/gf_request.rb', line 3

def method
  @method
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/gmoney/gf_request.rb', line 3

def url
  @url
end