Class: Fig::Package::Install

Inherits:
Object
  • Object
show all
Includes:
Statement
Defined in:
lib/fig/package/install.rb

Instance Method Summary collapse

Methods included from Statement

#urls, #walk_statements

Constructor Details

#initialize(statements) ⇒ Install

Returns a new instance of Install.



11
12
13
# File 'lib/fig/package/install.rb', line 11

def initialize(statements)
  @statements = statements
end

Instance Method Details

#unparse(indent) ⇒ Object



15
16
17
18
19
20
# File 'lib/fig/package/install.rb', line 15

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