Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Class definition an instantiation example.
class Dog
def initialize(name)
@name = name
end
def bark
puts "woof!"
end
end
my_dog = Dog.new("Gabe")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.