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
-
#_environment ⇒ Object
readonly
Returns the value of attribute _environment.
-
#_scale ⇒ Object
readonly
Returns the value of attribute _scale.
-
#_secret_environment ⇒ Object
readonly
Returns the value of attribute _secret_environment.
Instance Method Summary collapse
Instance Attribute Details
#_environment ⇒ Object (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 |
#_scale ⇒ Object (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_environment ⇒ Object (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 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 |