Class: Pm::Config

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

Overview

Basic configuration for a processes

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



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

def config
  @config
end

Instance Method Details

#load(dir = '.') ⇒ Object



27
28
29
30
31
32
33
# File 'lib/flow.rb', line 27

def load(dir = '.')
  @config ||= {}
  Dir[[dir, '*.yml'].join('/')].each do |file_name|
    pc = YAML.load_file(file_name)
    @config[pc['tag']] = pc
  end
end