jayk edited this page May 22, 2014 · 18 revisions

Getting Started

IZ Methods

  • iz.Package - Creates a new package and registers it’s namespace.
  • iz.Module - Returns the class with the name provided.
  • iz.Use - Ensures that classname is loaded and available to be used.
  • iz.Tetchy - Tells IZ whether it should be particularly tetchy about common misuses / coding mistakes.
  • iz.get_metadata - Inspects an object and returns information about it.
  • iz.localize - Localize returns a lightweight 'copy on write' deep clone to use in place of the original.

Class (Package) Methods

  • Class.has - Defines a new object attribute.
  • Class.mixin - Adds the functionality of the given class to Class by copying all the methods and attributes of the provided class onto the current object.
  • Class._on_object_create - A user-defined method called when a new object is created from the Class.
  • SUPER - A special function used to retrieve a superclass' version of a given method bound to the provided object.

Object Instance Methods

  • obj.can - Introspection routine, returns true if obj has a method called 'methodname'.
  • obj.does - Introspection routine, returns true if obj can do what classname does.
  • obj.get_current_state - The get_current_state method returns a flat 'generic' javascript object representing the state of the object.
  • obj.get_default - Returns the default value for a given attribute.
  • obj.isa - Introspection routine, returns true if obj is a member or subclass of the class provided, false otherwise.