Class: DeployDocus::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#applicationObject

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