Skip to content

Instantly share code, notes, and snippets.

@probablycorey
Created March 10, 2010 18:30
Show Gist options
  • Select an option

  • Save probablycorey/328178 to your computer and use it in GitHub Desktop.

Select an option

Save probablycorey/328178 to your computer and use it in GitHub Desktop.
waxClass{"Store"}
function milk()
-- milk is added to Store, so you can call it with Store.milk()
puts "milk called"
end
function eggs(self)
-- eggs takes a self arg, but you could still call it as a class
-- method Store:eggs(). Store would be passed in as self
--
-- You could also call it like an instance method
-- Store:init():eggs(). An instance of Store would be passed in as self
puts "eggs called"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment