Class: Kamal::Configuration::Alias
- Inherits:
-
Object
- Object
- Kamal::Configuration::Alias
- Includes:
- Validation
- Defined in:
- lib/kamal/configuration/alias.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, config:) ⇒ Alias
constructor
A new instance of Alias.
Methods included from Validation
Constructor Details
#initialize(name, config:) ⇒ Alias
Returns a new instance of Alias.
6 7 8 9 10 11 12 13 14 |
# File 'lib/kamal/configuration/alias.rb', line 6 def initialize(name, config:) @name, @command = name.inquiry, config.raw_config["aliases"][name] validate! \ command, example: validation_yml["aliases"]["uname"], context: "aliases/#{name}", with: Kamal::Configuration::Validator::Alias end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
4 5 6 |
# File 'lib/kamal/configuration/alias.rb', line 4 def command @command end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/kamal/configuration/alias.rb', line 4 def name @name end |