Class: IDL::Scanner::TokenRegistry

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

Overview

of class StrIStream

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



166
167
168
# File 'lib/ridl/scanner.rb', line 166

def [](key)
  super(::Symbol === key ? key : key.to_s.to_sym)
end

#[]=(key, val) ⇒ Object



169
170
171
# File 'lib/ridl/scanner.rb', line 169

def []=(key, val)
  super(::Symbol === key ? key : key.to_s.to_sym, val.to_s)
end

#assoc(key) ⇒ Object



178
179
180
181
# File 'lib/ridl/scanner.rb', line 178

def assoc(key)
  k_ = (::Symbol === key ? key : key.to_s.to_sym)
  self.has_key?(k_) ? [k_, self[k_]] : nil
end

#delete(key) ⇒ Object



175
176
177
# File 'lib/ridl/scanner.rb', line 175

def delete(key)
  super(::Symbol === key ? key : key.to_s.to_sym)
end

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


172
173
174
# File 'lib/ridl/scanner.rb', line 172

def has_key?(key)
  super(::Symbol === key ? key : key.to_s.to_sym)
end