Skip to content

Instantly share code, notes, and snippets.

@mgiagante
Last active April 2, 2018 08:10
Show Gist options
  • Save mgiagante/3c23ae5cd542bf6af8885c4c1aa084f3 to your computer and use it in GitHub Desktop.
Save mgiagante/3c23ae5cd542bf6af8885c4c1aa084f3 to your computer and use it in GitHub Desktop.
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