Class: Restify::Timeout::Error

Inherits:
Timeout::Error
  • Object
show all
Defined in:
lib/restify/timeout.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ Error

Returns a new instance of Error.



72
73
74
75
76
77
78
79
80
# File 'lib/restify/timeout.rb', line 72

def initialize(target)
  @target = target

  if @target
    super "Operation on #{@target} timed out"
  else
    super 'Operation timed out'
  end
end

Instance Attribute Details

#targetObject (readonly)

Returns the value of attribute target.



70
71
72
# File 'lib/restify/timeout.rb', line 70

def target
  @target
end