Module: Decking::Parser

Extended by:
Parser
Included in:
Parser
Defined in:
lib/decking/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

Returns the value of attribute config.



6
7
8
# File 'lib/decking/parser.rb', line 6

def config
  @config
end

#config_pathObject

Returns the value of attribute config_path.



6
7
8
# File 'lib/decking/parser.rb', line 6

def config_path
  @config_path
end

Instance Method Details

#config_file(config_file) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/decking/parser.rb', line 8

def config_file config_file
  config_file ||= 'decking.yaml'

  @config = Hashie::Mash.new(YAML.load_file(config_file))
  @config_path = File.realpath(config_file)

  confirm_requirements

end

#parse(cluster) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/decking/parser.rb', line 22

def parse cluster
  parse_images
  parse_containers
  parse_clusters
  parse_groups
  merge_cluster_config cluster
end


18
19
20
# File 'lib/decking/parser.rb', line 18

def print
  puts config.to_yaml
end