Last active
February 10, 2017 14:46
-
-
Save taishi41228/bc47d1f2938915c04098a23b03481bc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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