Class: Yandex360::Instrumentation::Event

Inherits:
Struct
  • Object
show all
Defined in:
lib/yandex360/instrumentation.rb

Overview

http_method rather than method: a Struct member called method would override Object#method, which callers legitimately use.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#duration ⇒ Object

Returns the value of attribute duration

Returns:

  • (Object) —

    the current value of duration



22
23
24
# File 'lib/yandex360/instrumentation.rb', line 22

def duration
  @duration
end

#error ⇒ Object

Returns the value of attribute error

Returns:

  • (Object) —

    the current value of error



22
23
24
# File 'lib/yandex360/instrumentation.rb', line 22

def error
  @error
end

#http_method ⇒ Object

Returns the value of attribute http_method

Returns:

  • (Object) —

    the current value of http_method



22
23
24
# File 'lib/yandex360/instrumentation.rb', line 22

def http_method
  @http_method
end

#path ⇒ Object

Returns the value of attribute path

Returns:

  • (Object) —

    the current value of path



22
23
24
# File 'lib/yandex360/instrumentation.rb', line 22

def path
  @path
end

#status ⇒ Object

Returns the value of attribute status

Returns:

  • (Object) —

    the current value of status



22
23
24
# File 'lib/yandex360/instrumentation.rb', line 22

def status
  @status
end

Instance Method Details

#success? ⇒ Boolean

Returns:

  • (Boolean)


23
# File 'lib/yandex360/instrumentation.rb', line 23

def success? = !error && status.to_i.between?(200, 299)