Class: IDL::Scanner::CharRegistry
- Inherits:
-
Object
- Object
- IDL::Scanner::CharRegistry
- Defined in:
- lib/ridl/scanner.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(table_) ⇒ CharRegistry
constructor
A new instance of CharRegistry.
Constructor Details
#initialize(table_) ⇒ CharRegistry
Returns a new instance of CharRegistry.
185 186 187 |
# File 'lib/ridl/scanner.rb', line 185 def initialize(table_) @table = table_ end |
Instance Method Details
#[](key) ⇒ Object
188 189 190 191 |
# File 'lib/ridl/scanner.rb', line 188 def [](key) key = (::Integer === key) ? key.chr.to_sym : key.to_sym @table[key] end |