Kiss A simpler, smarter web application framework for Ruby

Hash Subclass of Object

Description

Methods to enable hash.attr == hash[attr] syntax, including hash.id and hash.type

Public Instance Methods

id() source

Not documented

    # File lib/kiss/hacks.rb, line 41
  def id
    self['id'] || self [:id]
  end
    
method_missing(meth,*args) source

Not documented

    # File lib/kiss/hacks.rb, line 34
  def method_missing(meth,*args)
    if /=$/=~(meth=meth.id2name) then
      self[meth[0...-1]] = (args.length<2 ? args[0] : args)
    else
      self[meth] || self[meth.to_sym]
    end
  end
    
type() source

Not documented

    # File lib/kiss/hacks.rb, line 44
  def type
    self['type'] || self [:type] || Hash
  end
    

Disabled; run with $DEBUG to generate this.