Class: Makit::Configuration::Step
- Inherits:
-
Object
- Object
- Makit::Configuration::Step
- Defined in:
- lib/makit/configuration/step.rb
Overview
Individual step in a project configuration
Instance Attribute Summary collapse
-
#commands ⇒ Object
Returns the value of attribute commands.
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, description:, commands:) ⇒ Step
constructor
A new instance of Step.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, description:, commands:) ⇒ Step
Returns a new instance of Step.
9 10 11 12 13 14 15 |
# File 'lib/makit/configuration/step.rb', line 9 def initialize(name:, description:, commands:) @name = name @description = description @commands = commands.is_a?(Array) ? commands : [commands] validate_commands end |
Instance Attribute Details
#commands ⇒ Object
Returns the value of attribute commands.
7 8 9 |
# File 'lib/makit/configuration/step.rb', line 7 def commands @commands end |
#description ⇒ Object
Returns the value of attribute description.
7 8 9 |
# File 'lib/makit/configuration/step.rb', line 7 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/makit/configuration/step.rb', line 7 def name @name end |
Instance Method Details
#to_h ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/makit/configuration/step.rb', line 17 def to_h { name: @name, description: @description, commands: @commands, } end |