Module: Operandi::ReservedNames

Defined in:
lib/operandi/constants.rb

Overview

Reserved names that cannot be used for arguments, outputs, or steps These names would conflict with existing gem methods

Constant Summary collapse

BASE_METHODS =

Instance methods from Base class and concerns

[
  :arg,
  :output,
  :errors,
  :warnings,
  :success?,
  :failed?,
  :errors?,
  :warnings?,
  :stop!,
  :stopped?,
  :stop_immediately!,
  :call,
  :run_callbacks,
].freeze
CLASS_METHODS =

Class methods that could conflict

[
  :config,
  :run,
  :run!,
  :with,
  :arg,
  :remove_arg,
  :output,
  :remove_output,
  :step,
  :remove_step,
  :steps,
  :outputs,
  :arguments,
].freeze
CALLBACK_METHODS =

Callback method names

[
  :before_step_run,
  :after_step_run,
  :around_step_run,
  :on_step_success,
  :on_step_failure,
  :on_step_crash,
  :before_service_run,
  :after_service_run,
  :around_service_run,
  :on_service_success,
  :on_service_failure,
].freeze
RUBY_RESERVED =

Ruby reserved words and common Object methods

[
  :initialize,
  :class,
  :object_id,
  :send,
  :__send__,
  :public_send,
  :respond_to?,
  :method,
  :methods,
  :instance_variable_get,
  :instance_variable_set,
  :instance_variables,
  :extend,
  :include,
  :new,
  :allocate,
  :superclass,
].freeze
ALL =

All reserved names combined (used for validation)

(BASE_METHODS + CALLBACK_METHODS + RUBY_RESERVED).uniq.freeze