Class: Libhoney::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/libhoney/response.rb

Defined Under Namespace

Classes: Status

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#durationObject

Returns the value of attribute duration.


13
14
15
# File 'lib/libhoney/response.rb', line 13

def duration
  @duration
end

#errorObject

Returns the value of attribute error.


13
14
15
# File 'lib/libhoney/response.rb', line 13

def error
  @error
end

#metadataObject

Returns the value of attribute metadata.


13
14
15
# File 'lib/libhoney/response.rb', line 13

def 
  @metadata
end

#status_codeObject

Returns the value of attribute status_code.


13
14
15
# File 'lib/libhoney/response.rb', line 13

def status_code
  @status_code
end