Class: Jazzy::Executable::IO

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

Instance Method Summary collapse

Methods inherited from Array

#to_where_clause

Constructor Details

#initialize(io = nil) ⇒ IO

Returns a new instance of IO.



6
7
8
9
# File 'lib/jazzy/executable.rb', line 6

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

Instance Method Details

#<<(value) ⇒ Object



11
12
13
14
15
# File 'lib/jazzy/executable.rb', line 11

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

#to_sObject



17
18
19
# File 'lib/jazzy/executable.rb', line 17

def to_s
  join("\n")
end