Class: Datacenter::Shell::Local::SafeIO

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/datacenter/shell/local.rb

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ SafeIO

Returns a new instance of SafeIO.



6
7
8
9
# File 'lib/datacenter/shell/local.rb', line 6

def initialize(io)
  @io = io
  super StringIO.new
end

Instance Method Details

#write(message) ⇒ Object



11
12
13
14
# File 'lib/datacenter/shell/local.rb', line 11

def write(message)
  super message
  @io.write message
end