Class: Lynx::Pipe::Debug

Inherits:
Basic
  • Object
show all
Defined in:
lib/lynx/pipe/debug.rb

Instance Method Summary collapse

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

#clearObject



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