Class: CrackPipe::Action::Step

Inherits:
Object
  • Object
show all
Defined in:
lib/crack_pipe/action/step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#execObject (readonly)

Returns the value of attribute exec.



6
7
8
# File 'lib/crack_pipe/action/step.rb', line 6

def exec
  @exec
end

#trackObject (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

Returns:

  • (Boolean)


20
21
22
# File 'lib/crack_pipe/action/step.rb', line 20

def always_pass?
  @always_pass
end