Class: Kondate::HostPlugin::Base
- Inherits:
-
Object
- Object
- Kondate::HostPlugin::Base
- Defined in:
- lib/kondate/host_plugin/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#get_environment(host) ⇒ String
Environment name.
-
#get_hosts(role) ⇒ Array
Available from kondate >= 0.3.0.
-
#get_roles(host) ⇒ Array
Array of roles.
-
#initialize(config) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(config) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/kondate/host_plugin/base.rb', line 7 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
4 5 6 |
# File 'lib/kondate/host_plugin/base.rb', line 4 def config @config end |
Instance Method Details
#get_environment(host) ⇒ String
Returns environment name.
13 14 15 |
# File 'lib/kondate/host_plugin/base.rb', line 13 def get_environment(host) ENV['ENVIRONMENT'] || 'development' end |
#get_hosts(role) ⇒ Array
Available from kondate >= 0.3.0
27 28 29 |
# File 'lib/kondate/host_plugin/base.rb', line 27 def get_hosts(role) raise NotImplementedError end |
#get_roles(host) ⇒ Array
Returns array of roles.
19 20 21 |
# File 'lib/kondate/host_plugin/base.rb', line 19 def get_roles(host) raise NotImplementedError end |