Test data: the "Car" class must have a "clone" function.

paper
Philippe PITTOLI 2024-05-07 01:38:52 +02:00
parent cab18cd26b
commit 345390f4db
1 changed files with 2 additions and 0 deletions

View File

@ -93,6 +93,8 @@ class Car
property color : String # a simple attribute (1-n relations)
property keywords : Array(String) # tags about a car, example: "shiny" (n-n relations)
def_clone
def initialize(@name, @color, @keywords)
end
class_getter cars = [