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



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

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

#[]=(key, val) ⇒ Object



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

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

#assoc(key) ⇒ Object



195
196
197
198
# File 'lib/ridl/scanner.rb', line 195

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

#delete(key) ⇒ Object



192
193
194
# File 'lib/ridl/scanner.rb', line 192

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

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


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

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