Skip to content

Instantly share code, notes, and snippets.

@santosh79
Created November 16, 2009 21:26
Show Gist options
  • Save santosh79/236331 to your computer and use it in GitHub Desktop.
Save santosh79/236331 to your computer and use it in GitHub Desktop.
#We can force the execution order of methods
class Foo
def start
def stop
end
end
end
f = Foo.new
f.stop #This FAILS because the *stop* method does not get defined until the start gets called
f.start
f.stop #Now it succeeds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment