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.
7 8 9 |
# File 'lib/generator/config.rb', line 7 def initialize(project_path) @project_path = project_path end |
Instance Attribute Details
#configs ⇒ Object
Returns the value of attribute configs.
5 6 7 |
# File 'lib/generator/config.rb', line 5 def configs @configs end |
Instance Method Details
#accounts ⇒ Object
19 20 21 |
# File 'lib/generator/config.rb', line 19 def accounts configs['accounts'] end |
#environment_configs ⇒ Object
23 24 25 |
# File 'lib/generator/config.rb', line 23 def environment_configs configs['environment_configs'] end |
#environments ⇒ Object
15 16 17 |
# File 'lib/generator/config.rb', line 15 def environments configs['environments'] end |
#read_configs ⇒ Object
27 28 29 30 |
# File 'lib/generator/config.rb', line 27 def read_configs file = "#{@project_path}/config/config.yml" YAML.load_file(file) end |