Skip to content

Instantly share code, notes, and snippets.

@brianstorti
Created November 8, 2011 23:33
Show Gist options
  • Save brianstorti/1349707 to your computer and use it in GitHub Desktop.
Save brianstorti/1349707 to your computer and use it in GitHub Desktop.
Defining a class w/o the class keyword
#with class
class MyClass < Array
def my_method
"w00t"
end
end
#without class
MyClass = Class.new(Array) do
def my_method
"w00t"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment