Class: Kuby::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/kuby/environment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#configuredObject Also known as: configured?

Returns the value of attribute configured.



5
6
7
# File 'lib/kuby/environment.rb', line 5

def configured
  @configured
end

#definitionObject (readonly)

Returns the value of attribute definition.



4
5
6
# File 'lib/kuby/environment.rb', line 4

def definition
  @definition
end

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



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