Class: Kibo::Instance
- Inherits:
-
String
- Object
- String
- Kibo::Instance
- Defined in:
- lib/kibo/config.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Freemium
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Instance Method Summary collapse
-
#initialize(config, role, count, number = 1) ⇒ Instance
constructor
A new instance of Instance.
- #instance_name ⇒ Object
Constructor Details
#initialize(config, role, count, number = 1) ⇒ Instance
Returns a new instance of Instance.
82 83 84 85 86 |
# File 'lib/kibo/config.rb', line 82 def initialize(config, role, count, number=1) @role, @count = role, count super "#{config.namespace}-#{config.environment}-#{role}#{number}" end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
80 81 82 |
# File 'lib/kibo/config.rb', line 80 def count @count end |
Instance Method Details
#instance_name ⇒ Object
88 89 90 |
# File 'lib/kibo/config.rb', line 88 def instance_name self.split("-", 2).last end |