Class: QueueBus::Config::Wrap

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

Overview

A wrapper that is always “truthy” but can contain an inner value. This is useful for checking that a thread local variable is set to a value, even if that value happens to be nil. This is important because setting a thread local value to nil will cause it to be deleted.

Instance Attribute Summary collapse

Instance Attribute Details

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



24
25
26
# File 'lib/queue_bus/config.rb', line 24

def value
  @value
end