Skip to content

Instantly share code, notes, and snippets.

@brixen
Created July 14, 2009 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brixen/147251 to your computer and use it in GitHub Desktop.
Save brixen/147251 to your computer and use it in GitHub Desktop.
# Most of this can parse without modification, and be post-processed by compiler
import java.util.ArrayList
import java.lang.Runnable
class_attributes :name => 'foo'
class MyClass < ArrayList
implements Runnable
implements Serializable
# the arg syntax here is nonstandard, but similar to MacRuby and Duby
type :string, :int, :array
def initialize(str, bar)
super(bar)
setup(str)
end
type :string, [:void, :protected]
def setup(str)
...
end
type :void, :void
def run
...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment