Module: Dapp::Deployment::Config::Directive::Namespace::InstanceMethods

Included in:
Dapp::Deployment::Config::Directive::Namespace
Defined in:
lib/dapp/deployment/config/directive/namespace/instance_methods.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_environmentObject (readonly)

Returns the value of attribute _environment.



7
8
9
# File 'lib/dapp/deployment/config/directive/namespace/instance_methods.rb', line 7

def _environment
  @_environment
end

#_scaleObject (readonly)

Returns the value of attribute _scale.



7
8
9
# File 'lib/dapp/deployment/config/directive/namespace/instance_methods.rb', line 7

def _scale
  @_scale
end

#_secret_environmentObject (readonly)

Returns the value of attribute _secret_environment.



7
8
9
# File 'lib/dapp/deployment/config/directive/namespace/instance_methods.rb', line 7

def _secret_environment
  @_secret_environment
end

Instance Method Details

#environment(**kwargs) ⇒ Object



9
10
11
# File 'lib/dapp/deployment/config/directive/namespace/instance_methods.rb', line 9

def environment(**kwargs)
  sub_directive_eval { _environment.merge!(**kwargs) }
end

#scale(value) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/dapp/deployment/config/directive/namespace/instance_methods.rb', line 17

def scale(value)
  sub_directive_eval do
    value.to_i.tap do |v|
      raise ::Dapp::Error::Config, code: :unsupported_scale_value, data: { value: value } unless v > 0
      @_scale = v
    end
  end
end

#secret_environment(**kwargs) ⇒ Object



13
14
15
# File 'lib/dapp/deployment/config/directive/namespace/instance_methods.rb', line 13

def secret_environment(**kwargs)
  sub_directive_eval { _secret_environment.merge!(**kwargs) }
end