Module: SmokeyBear::Helpers
- Defined in:
- lib/smokey_bear/helpers.rb
Defined Under Namespace
Classes: ResponseDelegate
Instance Method Summary
collapse
Instance Method Details
#decoded_response ⇒ Object
31
32
33
|
# File 'lib/smokey_bear/helpers.rb', line 31
def decoded_response
@decoded_response ||= MultiJson.load(response.to_str)
end
|
#delete(*args) ⇒ Object
23
|
# File 'lib/smokey_bear/helpers.rb', line 23
def delete(*args); perform_request(:delete, *args); end
|
#get(*args) ⇒ Object
21
|
# File 'lib/smokey_bear/helpers.rb', line 21
def get(*args); perform_request(:get, *args); end
|
#head(*args) ⇒ Object
25
|
# File 'lib/smokey_bear/helpers.rb', line 25
def head(*args); perform_request(:head, *args); end
|
35
36
37
|
# File 'lib/smokey_bear/helpers.rb', line 35
def
response.
end
|
#post(*args) ⇒ Object
22
|
# File 'lib/smokey_bear/helpers.rb', line 22
def post(*args); perform_request(:post, *args); end
|
#put(*args) ⇒ Object
24
|
# File 'lib/smokey_bear/helpers.rb', line 24
def put(*args); perform_request(:put, *args); end
|
#response ⇒ Object
27
28
29
|
# File 'lib/smokey_bear/helpers.rb', line 27
def response
@response ||= (raise "Please make sure you perform a request first")
end
|