Class: Autowatchr::Tee

Inherits:
StringIO
  • Object
show all
Defined in:
lib/autowatchr.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ Tee

Returns a new instance of Tee.



85
86
87
88
# File 'lib/autowatchr.rb', line 85

def initialize(io)
  super("")
  @io = io
end

Instance Attribute Details

#ioObject (readonly)

Returns the value of attribute io.



84
85
86
# File 'lib/autowatchr.rb', line 84

def io
  @io
end

Instance Method Details

#write(string) ⇒ Object



90
91
92
93
# File 'lib/autowatchr.rb', line 90

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