Module: BusinessFlow

Defined in:
lib/business_flow.rb,
lib/business_flow/dsl.rb,
lib/business_flow/base.rb,
lib/business_flow/step.rb,
lib/business_flow/compat.rb,
lib/business_flow/version.rb,
lib/business_flow/callable.rb,
lib/business_flow/cacheable.rb,
lib/business_flow/retryable.rb,
lib/business_flow/instrument.rb,
lib/business_flow/validations.rb,
lib/business_flow/cluster_lock.rb,
lib/business_flow/default_step_executor.rb,
lib/business_flow/flow_failed_exception.rb,
lib/business_flow/instrumented_executor.rb,
lib/business_flow/instrumented_step_executor.rb

Overview

Makes the magic happen.

Defined Under Namespace

Modules: Base, Cacheable, ClusterLock, Compat, DSL, Instrument, Retryable, Validations Classes: Callable, DefaultStepExecutor, FlowFailedException, InstrumentedExecutor, InstrumentedStepExecutor, Step

Constant Summary collapse

VERSION =
'0.19.6'

Class Method Summary collapse

Class Method Details

.active_model5?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/business_flow.rb', line 21

def self.active_model5?
  @active_model5_in_use ||= ActiveModel.version >= Gem::Version.new('5.0.0')
end

.add_error(errors, field, error_type, message) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/business_flow.rb', line 25

def self.add_error(errors, field, error_type, message)
  if active_model5?
    errors.add(field, error_type, message: message)
  else
    errors.add(field, message)
  end
end