Class: Build::Controller::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/build/controller.rb

Overview

A builder class for constructing the controller.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Builder

Initialize the builder with an empty list of nodes.



26
27
28
# File 'lib/build/controller.rb', line 26

def initialize
	@nodes = []
end

Instance Attribute Details

#nodes ⇒ Object (readonly)

Returns the value of attribute nodes.



31
32
33
# File 'lib/build/controller.rb', line 31

def nodes
  @nodes
end

#The list of nodes to build.(listofnodestobuild.) ⇒ Object (readonly)



31
# File 'lib/build/controller.rb', line 31

attr :nodes

Instance Method Details

#add_chain(chain, arguments = [], environment) ⇒ Object

Add a build environment to the controller.



34
35
36
# File 'lib/build/controller.rb', line 34

def add_chain(chain, arguments = [], environment)
	@nodes << ChainNode.new(chain, arguments, environment)
end