Class: Gem::LoadCache::Trie

Inherits:
Struct
  • Object
show all
Defined in:
lib/gem/cache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#trieObject

Returns the value of attribute trie

Returns:

  • (Object)

    the current value of trie



4
5
6
# File 'lib/gem/cache.rb', line 4

def trie
  @trie
end

#valuesObject

Returns the value of attribute values

Returns:

  • (Object)

    the current value of values



4
5
6
# File 'lib/gem/cache.rb', line 4

def values
  @values
end

Instance Method Details

#get(x) ⇒ Object



5
6
7
8
# File 'lib/gem/cache.rb', line 5

def get(x)
  value = trie.get(x) 
  return value ? values[value] : nil
end