Class: Mockingbird::Commands::Wait
- Defined in:
- lib/mockingbird/commands.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
-
#initialize(time = nil, &block) ⇒ Wait
constructor
A new instance of Wait.
- #run(conn) ⇒ Object
Methods inherited from Command
Constructor Details
#initialize(time = nil, &block) ⇒ Wait
Returns a new instance of Wait.
56 57 58 |
# File 'lib/mockingbird/commands.rb', line 56 def initialize(time=nil,&block) @time = time || block end |
Instance Method Details
#run(conn) ⇒ Object
60 61 62 63 64 |
# File 'lib/mockingbird/commands.rb', line 60 def run(conn) EM.add_timer(wait_time) do advance(conn) end end |