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.



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

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.



68
69
70
# File 'lib/restify/timeout.rb', line 68

def target
  @target
end