Module: Hijack::Console::OutputReceiver
- Defined in:
- lib/hijack/console.rb
Class Method Summary collapse
- .mute ⇒ Object
- .puts(where, str) ⇒ Object
- .start(remote) ⇒ Object
- .unmute(remote) ⇒ Object
- .write(where, str) ⇒ Object
Class Method Details
.mute ⇒ Object
49 50 51 |
# File 'lib/hijack/console.rb', line 49 def mute @mute = true end |
.puts(where, str) ⇒ Object
62 63 64 |
# File 'lib/hijack/console.rb', line 62 def puts(where, str) Object.const_get(where.upcase).puts(str) unless @mute end |
.start(remote) ⇒ Object
66 67 68 69 70 |
# File 'lib/hijack/console.rb', line 66 def start(remote) DRb.start_service(Hijack.socket_for(Process.pid), self) remote.evaluate("__hijack_output_receiver_ready_#{Process.pid}") @started = true end |
.unmute(remote) ⇒ Object
53 54 55 56 |
# File 'lib/hijack/console.rb', line 53 def unmute(remote) start(remote) unless @started @mute = false end |
.write(where, str) ⇒ Object
58 59 60 |
# File 'lib/hijack/console.rb', line 58 def write(where, str) Object.const_get(where.upcase).write(str) unless @mute end |