Class: Mockingbird::Commands::Send
- Defined in:
- lib/mockingbird/commands.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
-
#initialize(data = nil, &block) ⇒ Send
constructor
A new instance of Send.
- #run(conn) ⇒ Object
Methods inherited from Command
Constructor Details
#initialize(data = nil, &block) ⇒ Send
Returns a new instance of Send.
24 25 26 |
# File 'lib/mockingbird/commands.rb', line 24 def initialize(data=nil,&block) @data = data || block end |
Instance Method Details
#run(conn) ⇒ Object
28 29 30 31 32 |
# File 'lib/mockingbird/commands.rb', line 28 def run(conn) to_send = data conn.send_chunk(to_send) advance(conn) end |