Class: Cluster
- Inherits:
-
Object
- Object
- Cluster
- Defined in:
- lib/aml/Cluster.rb
Overview
Cluster will have access to all variable and mixin definitions.
Instance Method Summary collapse
- #definition ⇒ Object
-
#initialize(files) ⇒ Cluster
constructor
A new instance of Cluster.
- #log ⇒ Object
- #mixins ⇒ Object
- #post_process ⇒ Object
- #process ⇒ Object
- #variables ⇒ Object
Constructor Details
#initialize(files) ⇒ Cluster
Returns a new instance of Cluster.
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/aml/Cluster.rb', line 4 def initialize(files) @log = [] @definition = [] @cluster = { :variables => {}, :mixins => {} } files.each do |file| @definition << Definition.new(file[:file], file[:type], file[:bundle]) end end |
Instance Method Details
#definition ⇒ Object
38 39 40 |
# File 'lib/aml/Cluster.rb', line 38 def definition @definition end |
#log ⇒ Object
29 30 31 |
# File 'lib/aml/Cluster.rb', line 29 def log @log end |
#mixins ⇒ Object
35 36 37 |
# File 'lib/aml/Cluster.rb', line 35 def mixins @cluster[:mixins] end |
#post_process ⇒ Object
24 25 26 27 28 |
# File 'lib/aml/Cluster.rb', line 24 def post_process definition.each do |definition| process_conditional(definition) end end |
#process ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/aml/Cluster.rb', line 15 def process @definition.each do |definition| definition.log.each do |log| @log << log end process_variable_definition(definition) process_mixin_definition(definition) end end |
#variables ⇒ Object
32 33 34 |
# File 'lib/aml/Cluster.rb', line 32 def variables @cluster[:variables] end |