Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/dyndoc/base/tmpl/manager.rb

Overview

Symbol helpers ##################################

Instance Method Summary collapse

Instance Method Details

#to_keysObject



437
438
439
# File 'lib/dyndoc/base/tmpl/manager.rb', line 437

def to_keys
  to_s.to_keys
end

#to_varObject



441
442
443
444
445
446
447
# File 'lib/dyndoc/base/tmpl/manager.rb', line 441

def to_var
  if Dyndoc.tmpl_mngr and (res=Dyndoc.tmpl_mngr.vars.extract(self.to_s))
    res
  else
    self
  end
end

#to_var=(val) ⇒ Object



449
450
451
452
453
# File 'lib/dyndoc/base/tmpl/manager.rb', line 449

def to_var=(val)
  if Dyndoc.tmpl_mngr
    Dyndoc.tmpl_mngr.vars[self.to_s]=val
  end
end