Class: PropertyGenerator::Config
- Inherits:
-
Object
- Object
- PropertyGenerator::Config
- Defined in:
- lib/generator/config.rb
Instance Attribute Summary collapse
-
#configs ⇒ Object
Returns the value of attribute configs.
Instance Method Summary collapse
- #accounts ⇒ Object
- #environment_configs ⇒ Object
- #environments ⇒ Object
-
#initialize(project_path) ⇒ Config
constructor
A new instance of Config.
- #read_configs ⇒ Object
Constructor Details
#initialize(project_path) ⇒ Config
Returns a new instance of Config.
6 7 8 |
# File 'lib/generator/config.rb', line 6 def initialize(project_path) @project_path = project_path end |
Instance Attribute Details
#configs ⇒ Object
Returns the value of attribute configs.
4 5 6 |
# File 'lib/generator/config.rb', line 4 def configs @configs end |
Instance Method Details
#accounts ⇒ Object
18 19 20 |
# File 'lib/generator/config.rb', line 18 def accounts configs['accounts'] end |
#environment_configs ⇒ Object
22 23 24 |
# File 'lib/generator/config.rb', line 22 def environment_configs configs['environment_configs'] end |
#environments ⇒ Object
14 15 16 |
# File 'lib/generator/config.rb', line 14 def environments configs['environments'] end |
#read_configs ⇒ Object
26 27 28 29 |
# File 'lib/generator/config.rb', line 26 def read_configs file = "#{@project_path}/config/config.yml" YAML.load_file(file) end |