Module: ConvenientService::Service::Plugins::CanHaveSteps

Defined in:
lib/convenient_service/service/plugins/can_have_steps.rb,
lib/convenient_service/service/plugins/can_have_steps/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method.rb,
lib/convenient_service/service/plugins/can_have_steps/commands/is_step.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/service.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/service/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/exceptions.rb,
lib/convenient_service/service/plugins/can_have_steps/commands/create_step_class.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/exceptions.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/key.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/structs/params.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/name.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/raw.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/class_methods.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/base.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/proc.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/alias.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/usual.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/service/concern/class_methods.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/base.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/directions/base.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/directions/input.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/method.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/string.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/symbol.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/service/concern/instance_methods.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_inspect/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/directions/output.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result/exceptions.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_result/middleware.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_factory.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash/base.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_direction.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_completed/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash/raw_value.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash/proc_value.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/exceptions.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/middleware.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/exceptions.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/middleware.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash/string_value.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/factories/hash/symbol_value.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/exceptions.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/middleware.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_parent_result/middleware.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_amazing_print_inspect/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/has_awesome_print_inspect/concern.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/raises_on_not_result_return_value/exceptions.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/raises_on_not_result_return_value/middleware.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_method_step/commands/calculate_method_result.rb,
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/commands/calculate_service_result.rb

Defined Under Namespace

Modules: Commands, Concern, Entities

Class Method Summary collapse

Class Method Details

.step?(step) ⇒ Boolean

Checks whether an object is a step instance.

Examples:

Simple usage.

class Service
  include ConvenientService::Standard::Config

  step :result

  def result
    success
  end
end

step = Service.new.steps.first

ConvenientService::Plugins::Service::CanHaveSteps.step?(step)
# => true

ConvenientService::Plugins::Service::CanHaveSteps.step?(42)
# => false

Parameters:

  • step (Object)

    Can be any type.

Returns:

  • (Boolean)


39
40
41
# File 'lib/convenient_service/service/plugins/can_have_steps.rb', line 39

def step?(step)
  Commands::IsStep[step: step]
end