Class: Fig::Package::Install

Inherits:
Object
  • Object
show all
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

Methods included from Statement

#urls, #walk_statements

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