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.



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

def initialize(step:)
  @step = step
end

Instance Attribute Details

#stepObject (readonly)

Returns the value of attribute step.



13
14
15
# File 'lib/convenient_service/service/plugins/can_have_steps/commands/is_step.rb', line 13

def step
  @step
end

Instance Method Details

#callBoolean

Returns:

  • (Boolean)


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

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