public
Description: Loonar: The flexible object system for Lua
Home | Edit | New

GenericMethod

  • generic method – by default all method defined in a class is generic methods (except : overloaded and magic methods)
  • instance method
  • class methods

Example


person = class {
    -- Generic methods
    walk = function(self)
    end;

    -- Instance methods
    ['instance:mood'] = function(self)
    end;

    -- Class methods
    ['class:find_by_name'] = function(name)
    end;
}
Last edited by speedmax, Sat Aug 16 00:35:27 -0700 2008
Home | Edit | New
Versions: