class HID::Persistence::Memory::Identifier

Attributes

store[RW]

Public Class Methods

find(input, type) click to toggle source
# File lib/hid/persistence/memory/identifier.rb, line 8
def find(input, type)
  (type_hash = store[type]) && type_hash[input]
end
map(input, identity, type) click to toggle source
# File lib/hid/persistence/memory/identifier.rb, line 12
def map(input, identity, type)
  type_hash = store[type] ||= Hash.new
  type_hash[input] = identity
  nil
end