Class: UserConfigurations::Configuration
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- UserConfigurations::Configuration
- Defined in:
- lib/user_configurations/configuration.rb
Instance Attribute Summary collapse
-
#project_name ⇒ Object
Returns the value of attribute project_name.
Instance Method Summary collapse
-
#initialize(project_name) ⇒ Configuration
constructor
A new instance of Configuration.
- #store(values) ⇒ Object
Constructor Details
#initialize(project_name) ⇒ Configuration
7 8 9 10 |
# File 'lib/user_configurations/configuration.rb', line 7 def initialize(project_name) @project_name = project_name super global.merge(user).merge(environment).with_indifferent_access end |
Instance Attribute Details
#project_name ⇒ Object
Returns the value of attribute project_name.
5 6 7 |
# File 'lib/user_configurations/configuration.rb', line 5 def project_name @project_name end |
Instance Method Details
#store(values) ⇒ Object
12 13 14 15 |
# File 'lib/user_configurations/configuration.rb', line 12 def store(values) File.write user_file, YAML.dump(user.merge(values)) merge! values end |