Class: Libhoney::Response
- Inherits:
-
Object
- Object
- Libhoney::Response
- Defined in:
- lib/libhoney/response.rb
Defined Under Namespace
Classes: Status
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#error ⇒ Object
Returns the value of attribute error.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(duration: 0, status_code: 0, metadata: nil, error: nil) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(duration: 0, status_code: 0, metadata: nil, error: nil) ⇒ Response
Returns a new instance of Response.
15 16 17 18 19 20 21 22 23 |
# File 'lib/libhoney/response.rb', line 15 def initialize(duration: 0, status_code: 0, metadata: nil, error: nil) @duration = duration @status_code = Status.new(status_code) @metadata = @error = error end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
13 14 15 |
# File 'lib/libhoney/response.rb', line 13 def duration @duration end |
#error ⇒ Object
Returns the value of attribute error.
13 14 15 |
# File 'lib/libhoney/response.rb', line 13 def error @error end |
#metadata ⇒ Object
Returns the value of attribute metadata.
13 14 15 |
# File 'lib/libhoney/response.rb', line 13 def @metadata end |
#status_code ⇒ Object
Returns the value of attribute status_code.
13 14 15 |
# File 'lib/libhoney/response.rb', line 13 def status_code @status_code end |