Class: OperatorRecordable::CurrentAttributesStore::Current

Inherits:
ActiveSupport::CurrentAttributes
  • Object
show all
Defined in:
lib/operator_recordable/store/current_attributes_store.rb

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



8
9
10
11
12
# File 'lib/operator_recordable/store/current_attributes_store.rb', line 8

def [](key)
  return nil unless self.store

  self.store[key]
end

#[]=(key, value) ⇒ Object



14
15
16
17
# File 'lib/operator_recordable/store/current_attributes_store.rb', line 14

def []=(key, value)
  self.store ||= {}
  self.store[key] = value
end