Class: Bones::RPC::Future
- Inherits:
-
Celluloid::Future
- Object
- Celluloid::Future
- Bones::RPC::Future
- Defined in:
- lib/bones/rpc/future.rb
Instance Method Summary collapse
-
#initialize(*args, &block) ⇒ Future
constructor
A new instance of Future.
- #runtime ⇒ Object
- #signal(*args, &block) ⇒ Object
Constructor Details
#initialize(*args, &block) ⇒ Future
Returns a new instance of Future.
6 7 8 9 |
# File 'lib/bones/rpc/future.rb', line 6 def initialize(*args, &block) @start = Time.now super end |
Instance Method Details
#runtime ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/bones/rpc/future.rb', line 16 def runtime if @stop @stop - @start else Time.now - @start end end |
#signal(*args, &block) ⇒ Object
11 12 13 14 |
# File 'lib/bones/rpc/future.rb', line 11 def signal(*args, &block) @stop = Time.now super end |