Class: CrackPipe::Action::Step
- Inherits:
-
Object
- Object
- CrackPipe::Action::Step
- Defined in:
- lib/crack_pipe/action/step.rb
Instance Attribute Summary collapse
-
#exec ⇒ Object
readonly
Returns the value of attribute exec.
-
#track ⇒ Object
readonly
Returns the value of attribute track.
Instance Method Summary collapse
- #always_pass? ⇒ Boolean
-
#initialize(exec = nil, always_pass: false, track: :default, &blk) ⇒ Step
constructor
A new instance of Step.
Constructor Details
#initialize(exec = nil, always_pass: false, track: :default, &blk) ⇒ Step
Returns a new instance of Step.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/crack_pipe/action/step.rb', line 8 def initialize(exec = nil, always_pass: false, track: :default, **, &blk) if block_given? raise ArgumentError, '`exec` must be `nil` with a block' unless exec.nil? exec = blk end @always_pass = always_pass @exec = instantiate_action(exec) @track = track end |
Instance Attribute Details
#exec ⇒ Object (readonly)
Returns the value of attribute exec.
6 7 8 |
# File 'lib/crack_pipe/action/step.rb', line 6 def exec @exec end |
#track ⇒ Object (readonly)
Returns the value of attribute track.
6 7 8 |
# File 'lib/crack_pipe/action/step.rb', line 6 def track @track end |
Instance Method Details
#always_pass? ⇒ Boolean
20 21 22 |
# File 'lib/crack_pipe/action/step.rb', line 20 def always_pass? @always_pass end |