Class: Fluxo::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/fluxo/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



25
26
27
28
29
30
# File 'lib/fluxo/config.rb', line 25

def initialize
  @error_handlers = []
  @wrap_falsey_result = false
  @wrap_truthy_result = false
  @strict = false
end

Instance Attribute Details

#error_handlersObject (readonly)

Returns the value of attribute error_handlers.



14
15
16
# File 'lib/fluxo/config.rb', line 14

def error_handlers
  @error_handlers
end

#strict=(value) ⇒ Object (writeonly)

Auto handle errors/exceptions.



23
24
25
# File 'lib/fluxo/config.rb', line 23

def strict=(value)
  @strict = value
end

#wrap_falsey_resultObject

When set to true, the result of a falsey operation will be wrapped in a Failure.



17
18
19
# File 'lib/fluxo/config.rb', line 17

def wrap_falsey_result
  @wrap_falsey_result
end

#wrap_truthy_resultObject

When set to true, the result of a truthy operation will be wrapped in a Success.



20
21
22
# File 'lib/fluxo/config.rb', line 20

def wrap_truthy_result
  @wrap_truthy_result
end

Instance Method Details

#strict?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/fluxo/config.rb', line 32

def strict?
  !!@strict
end