Class: ConvenientService::Service::Plugins::CanHaveSteps::Commands::IsStep

Inherits:
ConvenientService::Support::Command show all
Defined in:
lib/convenient_service/service/plugins/can_have_steps/commands/is_step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ConvenientService::Support::Command

[], call

Constructor Details

#initialize(step:) ⇒ void

Parameters:

  • step (Object)

    Can be any type.



24
25
26
# File 'lib/convenient_service/service/plugins/can_have_steps/commands/is_step.rb', line 24

def initialize(step:)
  @step = step
end

Instance Attribute Details

#stepObject (readonly)

Returns the value of attribute step.



18
19
20
# File 'lib/convenient_service/service/plugins/can_have_steps/commands/is_step.rb', line 18

def step
  @step
end

Instance Method Details

#callBoolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/convenient_service/service/plugins/can_have_steps/commands/is_step.rb', line 31

def call
  step.class.include?(Entities::Step::Concern)
end