NAME

Squirrel::Template::Expr::WrapHash - virtual method wrapper for hashes


SYNOPSIS

  somehash.size
  somehash.keys
  somehash.values
  somehash.list
  somehash.delete(key)
  somehash.aKey
  somehash.set(key, value)
  somearray.is_list # always false
  somearray.is_hash # always true


DESCRIPTION

Provides virtual methods for hashes.


METHODS

size

Return the numbers of keys in the hash.

keys

Return a list of the keys in the hash.

values

Return a list of the values in the hash. The order of the elements of the lists returned by keys and values correspond.

list

Return a list of hashes each containing a key and value containing the key and value for each element of the hash.

delete

Delete a given key from the hash, returning the value that was at that key.

set(key, value)

Set entry key to value. Returns value.

is_list

Test if this object is a list. Always false for a hash.

is_hash

Test if this object is a hash. Always true for a hash.

is_code

Test if this object is a code object. Always false for a hash.


SEE ALSO

the Squirrel::Template::Expr manpage, the Squirrel::Template manpage


AUTHOR

Tony Cook <tony@develop-help.com>