Exception: ThrottledObject::Lock::WaitForLock

Inherits:
Error
  • Object
show all
Defined in:
lib/throttled_object/lock.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(time, *args) ⇒ WaitForLock

Returns a new instance of WaitForLock.



12
13
14
15
16
# File 'lib/throttled_object/lock.rb', line 12

def initialize(time, *args)
  super *args
  @available_at = Time.now + time
  @wait_for     = time
end

Instance Attribute Details

#available_atObject (readonly)

Returns the value of attribute available_at.



10
11
12
# File 'lib/throttled_object/lock.rb', line 10

def available_at
  @available_at
end

#wait_forObject (readonly)

Returns the value of attribute wait_for.



10
11
12
# File 'lib/throttled_object/lock.rb', line 10

def wait_for
  @wait_for
end