Class: Micro::Case::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/micro/case/config.rb

Instance Method Summary collapse

Instance Method Details

#activemodel_validation_errors_failureObject



28
29
30
31
32
# File 'lib/micro/case/config.rb', line 28

def activemodel_validation_errors_failure
  return @activemodel_validation_errors_failure if defined?(@activemodel_validation_errors_failure)

  @activemodel_validation_errors_failure = :invalid_attributes
end

#enable_activemodel_validation=(value) ⇒ Object



16
17
18
19
20
# File 'lib/micro/case/config.rb', line 16

def enable_activemodel_validation=(value)
  return unless Kind::Boolean[value]

  require 'micro/case/with_activemodel_validation'
end

#enable_transitions=(value) ⇒ Object



10
11
12
13
14
# File 'lib/micro/case/config.rb', line 10

def enable_transitions=(value)
  Micro::Case::Result.class_variable_set(
    :@@transitions_enabled, Kind::Boolean[value]
  )
end

#set_activemodel_validation_errors_failure=(value) ⇒ Object



22
23
24
25
26
# File 'lib/micro/case/config.rb', line 22

def set_activemodel_validation_errors_failure=(value)
  return unless value

  @activemodel_validation_errors_failure = Kind::Symbol[value]
end