Skip to content

Instantly share code, notes, and snippets.

@justincampbell
Created November 13, 2014 20:44
Show Gist options
  • Save justincampbell/7b3d4e268139e2c99aba to your computer and use it in GitHub Desktop.
Save justincampbell/7b3d4e268139e2c99aba to your computer and use it in GitHub Desktop.
class ClassOne
def name
:one
end
end
ClassOne.new.name # => :one
ClassTwo = Class.new do
def name
:two
end
end
ClassTwo.new.name # => :two
proc_three = -> do
def name
:three
end
name
end
proc_three.call # => :three
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment