Class: Dotman::Shell::Block
- Inherits:
-
Object
- Object
- Dotman::Shell::Block
- Defined in:
- lib/dotman/shell/block.rb
Instance Method Summary collapse
-
#initialize(commands) ⇒ Block
constructor
A new instance of Block.
- #to_s(level = 0) ⇒ Object
Constructor Details
#initialize(commands) ⇒ Block
Returns a new instance of Block.
3 4 5 |
# File 'lib/dotman/shell/block.rb', line 3 def initialize(commands) @commands = commands end |
Instance Method Details
#to_s(level = 0) ⇒ Object
7 8 9 |
# File 'lib/dotman/shell/block.rb', line 7 def to_s(level = 0) @commands.map { |command| command.to_s(level) }.join("\n") end |