Class: Kuby::Environment
- Inherits:
-
Object
- Object
- Kuby::Environment
- Defined in:
- lib/kuby/environment.rb
Instance Attribute Summary collapse
-
#configured ⇒ Object
(also: #configured?)
Returns the value of attribute configured.
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #app_name ⇒ Object
- #docker(&block) ⇒ Object
-
#initialize(name, definition, &block) ⇒ Environment
constructor
A new instance of Environment.
- #kubernetes(&block) ⇒ Object
Constructor Details
#initialize(name, definition, &block) ⇒ Environment
Returns a new instance of Environment.
9 10 11 12 |
# File 'lib/kuby/environment.rb', line 9 def initialize(name, definition, &block) @name = name @definition = definition end |
Instance Attribute Details
#configured ⇒ Object Also known as: configured?
Returns the value of attribute configured.
5 6 7 |
# File 'lib/kuby/environment.rb', line 5 def configured @configured end |
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
4 5 6 |
# File 'lib/kuby/environment.rb', line 4 def definition @definition end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/kuby/environment.rb', line 4 def name @name end |
Instance Method Details
#app_name ⇒ Object
26 27 28 |
# File 'lib/kuby/environment.rb', line 26 def app_name definition.app_name end |
#docker(&block) ⇒ Object
14 15 16 17 18 |
# File 'lib/kuby/environment.rb', line 14 def docker(&block) @docker ||= Docker::Spec.new(self) @docker.instance_eval(&block) if block @docker end |
#kubernetes(&block) ⇒ Object
20 21 22 23 24 |
# File 'lib/kuby/environment.rb', line 20 def kubernetes(&block) @kubernetes ||= Kubernetes::Spec.new(self) @kubernetes.instance_eval(&block) if block @kubernetes end |