class Lingo::Language::LexicalHash

Public Class Methods

new(id, lingo) click to toggle source
# File lib/lingo/language/lexical_hash.rb, line 45
def initialize(id, lingo)
  @src = Database.open(id, lingo)
end
open(*args) { |lexical_hash = new(*args)| ... } click to toggle source
# File lib/lingo/language/lexical_hash.rb, line 39
def self.open(*args)
  yield lexical_hash = new(*args)
ensure
  lexical_hash.close if lexical_hash
end

Public Instance Methods

[](key) click to toggle source
# File lib/lingo/language/lexical_hash.rb, line 53
def [](key)
  Database::Source.lexicals(@src[Unicode.downcase(key)])
end
close() click to toggle source
# File lib/lingo/language/lexical_hash.rb, line 49
def close
  @src.close
end