Class: Rbsh::Shell::Result
- Inherits:
-
Object
- Object
- Rbsh::Shell::Result
- Defined in:
- lib/rbsh/shell.rb
Instance Method Summary collapse
- #append(lines) ⇒ Object
-
#initialize ⇒ Result
constructor
A new instance of Result.
- #to_ary ⇒ Object
- #to_s ⇒ Object (also: #inspect)
Constructor Details
#initialize ⇒ Result
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_ary ⇒ Object
35 36 37 |
# File 'lib/rbsh/shell.rb', line 35 def to_ary @lines end |
#to_s ⇒ Object Also known as: inspect
39 40 41 |
# File 'lib/rbsh/shell.rb', line 39 def to_s @lines.join("") end |