Created
March 22, 2018 15:16
-
-
Save sevperez/75762cdad3f156ffe485e263782d7510 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Lion | |
attr_reader :name, :age, :weight, :height, :bravery | |
def initialize(name, age, weight, height, bravery) | |
@name = name | |
@age = age | |
@weight = weight | |
@height = height | |
@bravery = bravery | |
end | |
end | |
simba = Lion.new(“Simba”, 10, 37, 60, 99) | |
scar = Lion.new(“Scar”, 42, 190, 128, 72) | |
puts simba > scar # => NoMethodError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment