Class: Mu::Curl::Verify::Response
- Inherits:
-
Object
- Object
- Mu::Curl::Verify::Response
- Defined in:
- lib/mu/curl/verify.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(json) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(json) ⇒ Response
Returns a new instance of Response.
49 50 51 52 53 54 55 56 57 |
# File 'lib/mu/curl/verify.rb', line 49 def initialize json rs = Request.parse json['bytes'][1]['data'] @line = rs[:line] _, @status, @message = rs[:line].split(/\s+/, 3) @status = @status.to_i @content = rs[:content] @headers = Hash.new rs[:headers].each { |h| @headers[h[:key]] = h[:val] } end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
47 48 49 |
# File 'lib/mu/curl/verify.rb', line 47 def content @content end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
46 47 48 |
# File 'lib/mu/curl/verify.rb', line 46 def headers @headers end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
43 44 45 |
# File 'lib/mu/curl/verify.rb', line 43 def line @line end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
45 46 47 |
# File 'lib/mu/curl/verify.rb', line 45 def @message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
44 45 46 |
# File 'lib/mu/curl/verify.rb', line 44 def status @status end |