Class: Jazzy::Executable::IO

Inherits:
Array
  • Object
show all
Defined in:
lib/jazzy/executable.rb

Instance Method Summary collapse

Constructor Details

#initialize(io = nil) ⇒ IO

Returns a new instance of IO.



4
5
6
# File 'lib/jazzy/executable.rb', line 4

def initialize(io = nil)
  @io = io
end

Instance Method Details

#<<(value) ⇒ Object



8
9
10
11
12
# File 'lib/jazzy/executable.rb', line 8

def <<(value)
  super
ensure
  @io << value.to_s if @io
end

#to_sObject



14
15
16
# File 'lib/jazzy/executable.rb', line 14

def to_s
  join("\n")
end