Class: DeployDocus::Config
- Inherits:
-
Object
- Object
- DeployDocus::Config
- Defined in:
- lib/deploy_docus/config.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
Returns the value of attribute application.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #deploy_task(environment) ⇒ Object
-
#initialize(application) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(application) ⇒ Config
Returns a new instance of Config.
5 6 7 |
# File 'lib/deploy_docus/config.rb', line 5 def initialize(application) @application = application end |
Instance Attribute Details
#application ⇒ Object
Returns the value of attribute application.
3 4 5 |
# File 'lib/deploy_docus/config.rb', line 3 def application @application end |
Instance Method Details
#[](key) ⇒ Object
9 10 11 |
# File 'lib/deploy_docus/config.rb', line 9 def [](key) config[key.to_s] end |
#deploy_task(environment) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/deploy_docus/config.rb', line 13 def deploy_task(environment) data = self['deploy_task'] if data.is_a?(Hash) data[environment.to_s] else data end end |