Class: CslCli::Request::Get
- Inherits:
-
Object
- Object
- CslCli::Request::Get
- Defined in:
- lib/csl_cli/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.
23 24 25 26 |
# File 'lib/csl_cli/request.rb', line 23 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.
21 22 23 |
# File 'lib/csl_cli/request.rb', line 21 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
20 21 22 |
# File 'lib/csl_cli/request.rb', line 20 def response @response end |