Skip to content

Instantly share code, notes, and snippets.

@dimiro1
Created October 3, 2009 02:33
Show Gist options
  • Save dimiro1/200353 to your computer and use it in GitHub Desktop.
Save dimiro1/200353 to your computer and use it in GitHub Desktop.
class Person
def initialize(name)
@name = name
end
def name
@name
end
def hello
print("Hello")
end
end
p = Person.new("Claudemiro")
print(p.name) # this is fast
# => Claudemiro
p.hello # but this take so long
# => Hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment