Who can explain me the code snippets of "def name" and "def name=()"? I don't understand why it is defined 2 times.
class Bird < Animal
def initialize(name, length)
@name
@length
end
def name
@name
end
def name=(new_name)
@name = new_name
end
end