Class: Dapp::Deployment::Config::Directive::Expose::Port
- Inherits:
-
Base
- Object
- Config::Directive::Base
- Base
- Dapp::Deployment::Config::Directive::Expose::Port
- Defined in:
- lib/dapp/deployment/config/directive/expose.rb
Instance Attribute Summary collapse
-
#_number ⇒ Object
Returns the value of attribute _number.
-
#_protocol ⇒ Object
readonly
Returns the value of attribute _protocol.
-
#_target ⇒ Object
readonly
Returns the value of attribute _target.
Instance Method Summary collapse
-
#initialize(number, dapp:, &blk) ⇒ Port
constructor
A new instance of Port.
- #target(number) ⇒ Object
- #tcp ⇒ Object
- #udp ⇒ Object
Methods inherited from Base
Methods inherited from Config::Directive::Base
Constructor Details
#initialize(number, dapp:, &blk) ⇒ Port
Returns a new instance of Port.
34 35 36 37 38 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 34 def initialize(number, dapp:, &blk) self._number = number @_protocol = 'TCP' super(dapp: dapp, &blk) end |
Instance Attribute Details
#_number ⇒ Object
Returns the value of attribute _number.
32 33 34 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 32 def _number @_number end |
#_protocol ⇒ Object (readonly)
Returns the value of attribute _protocol.
32 33 34 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 32 def _protocol @_protocol end |
#_target ⇒ Object (readonly)
Returns the value of attribute _target.
32 33 34 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 32 def _target @_target end |
Instance Method Details
#target(number) ⇒ Object
40 41 42 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 40 def target(number) @_target = define_number(number, :unsupported_target_number) end |
#tcp ⇒ Object
44 45 46 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 44 def tcp @_protocol = 'TCP' end |
#udp ⇒ Object
48 49 50 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 48 def udp @_protocol = 'UDP' end |