Skip to content

Instantly share code, notes, and snippets.

@taishi41228
Last active February 10, 2017 14:46
Show Gist options
  • Save taishi41228/bc47d1f2938915c04098a23b03481bc8 to your computer and use it in GitHub Desktop.
Save taishi41228/bc47d1f2938915c04098a23b03481bc8 to your computer and use it in GitHub Desktop.
class Car
def initialize(carname)
@name = carname
end
def dispName
print(@name)
end
end
car = Car.new("crown")
car.dispName
car2 = Car.new("civic")
car2.dispName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment