Class: Cafmal::Request::Get
- Inherits:
-
Object
- Object
- Cafmal::Request::Get
- Defined in:
- lib/cafmal/request.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(url, headers) ⇒ Get
constructor
A new instance of Get.
Constructor Details
#initialize(url, headers) ⇒ Get
Returns a new instance of Get.
22 23 24 25 |
# File 'lib/cafmal/request.rb', line 22 def initialize(url, headers) @response = HTTParty.get(url, headers: headers) @code = @response.code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
20 21 22 |
# File 'lib/cafmal/request.rb', line 20 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
19 20 21 |
# File 'lib/cafmal/request.rb', line 19 def response @response end |