Class: Lynx::Pipe::Debug
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize(pipe = nil, io = STDOUT) ⇒ Debug
constructor
A new instance of Debug.
- #perform(command) ⇒ Object
Constructor Details
#initialize(pipe = nil, io = STDOUT) ⇒ Debug
Returns a new instance of Debug.
6 7 8 9 |
# File 'lib/lynx/pipe/debug.rb', line 6 def initialize(pipe = nil, io = STDOUT) @pipe = pipe @io = io end |
Instance Method Details
#clear ⇒ Object
17 18 19 20 21 |
# File 'lib/lynx/pipe/debug.rb', line 17 def clear @pipe.clear self end |
#perform(command) ⇒ Object
11 12 13 14 15 |
# File 'lib/lynx/pipe/debug.rb', line 11 def perform(command) @io.puts "[Lynx] #{filter(command)}" @pipe.perform(command) if has_pipe? end |