Class: IDL::Scanner::CharRegistry

Inherits:
Object
  • Object
show all
Defined in:
lib/ridl/scanner.rb

Instance Method Summary collapse

Constructor Details

#initialize(table_) ⇒ CharRegistry

Returns a new instance of CharRegistry.



202
203
204
# File 'lib/ridl/scanner.rb', line 202

def initialize(table_)
  @table = table_
end

Instance Method Details

#[](key) ⇒ Object



205
206
207
208
# File 'lib/ridl/scanner.rb', line 205

def [](key)
  key = (::Integer === key) ? key.chr.to_sym : key.to_sym
  @table[key]
end