Class: Kibo::Instance

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

Direct Known Subclasses

Freemium

Defined Under Namespace

Classes: Freemium

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#countObject (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_nameObject



88
89
90
# File 'lib/kibo/config.rb', line 88

def instance_name
  self.split("-", 2).last
end