Class: Sifterology::Request
- Inherits:
-
Object
- Object
- Sifterology::Request
- Includes:
- HTTParty
- Defined in:
- lib/sifterology/request.rb
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
debug_output $stdout.
-
#response ⇒ Object
readonly
debug_output $stdout.
Instance Method Summary collapse
-
#initialize(resource) ⇒ Request
constructor
A new instance of Request.
- #perform(*args) ⇒ Object
Constructor Details
#initialize(resource) ⇒ Request
Returns a new instance of Request.
11 12 13 |
# File 'lib/sifterology/request.rb', line 11 def initialize(resource) @resource = resource end |
Instance Attribute Details
#resource ⇒ Object (readonly)
debug_output $stdout
9 10 11 |
# File 'lib/sifterology/request.rb', line 9 def resource @resource end |
#response ⇒ Object (readonly)
debug_output $stdout
9 10 11 |
# File 'lib/sifterology/request.rb', line 9 def response @response end |
Instance Method Details
#perform(*args) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/sifterology/request.rb', line 15 def perform(*args) method, path, = args.shift, args.shift, args.last url = File.join(resource.session.account_url, path) ||= {} () process_response(self.class.send(method, url, )) end |