Class: Fig::Package::Install
- Inherits:
-
Object
- Object
- Fig::Package::Install
- Includes:
- Statement
- Defined in:
- lib/fig/package/install.rb
Overview
This class appears to be unused, though it is in the grammar.
Instance Method Summary collapse
-
#initialize(statements) ⇒ Install
constructor
A new instance of Install.
- #unparse(indent) ⇒ Object
Methods included from Statement
Constructor Details
#initialize(statements) ⇒ Install
Returns a new instance of Install.
12 13 14 |
# File 'lib/fig/package/install.rb', line 12 def initialize(statements) @statements = statements end |
Instance Method Details
#unparse(indent) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/fig/package/install.rb', line 16 def unparse(indent) prefix = "\n#{indent}install" body = @statements.map { |statement| statement.unparse(indent+' ') }.join("\n") suffix = "#{indent}end" return [prefix, body, suffix].join("\n") end |