Exception: ThrottledObject::Lock::WaitForLock
- Defined in:
- lib/throttled_object/lock.rb
Instance Attribute Summary collapse
-
#available_at ⇒ Object
readonly
Returns the value of attribute available_at.
-
#wait_for ⇒ Object
readonly
Returns the value of attribute wait_for.
Instance Method Summary collapse
-
#initialize(time, *args) ⇒ WaitForLock
constructor
A new instance of WaitForLock.
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_at ⇒ Object (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_for ⇒ Object (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 |