Class: Rbsh::Shell::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/rbsh/shell.rb

Instance Method Summary collapse

Constructor Details

#initializeResult

Returns a new instance of Result.



27
28
29
# File 'lib/rbsh/shell.rb', line 27

def initialize
  @lines = []
end

Instance Method Details

#append(lines) ⇒ Object



31
32
33
# File 'lib/rbsh/shell.rb', line 31

def append(lines)
  @lines += lines.to_ary
end

#to_aryObject



35
36
37
# File 'lib/rbsh/shell.rb', line 35

def to_ary
  @lines
end

#to_sObject Also known as: inspect



39
40
41
# File 'lib/rbsh/shell.rb', line 39

def to_s
  @lines.join("")
end