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



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

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

#[]=(key, val) ⇒ Object



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

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

#assoc(key) ⇒ Object



187
188
189
190
# File 'lib/ridl/scanner.rb', line 187

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

#delete(key) ⇒ Object



183
184
185
# File 'lib/ridl/scanner.rb', line 183

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

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


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

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