Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 800 Bytes

basic_subclasses_adam_and_eve.md

File metadata and controls

28 lines (22 loc) · 800 Bytes

Description

According to the creation myths of the Abrahamic religions, Adam and Eve were the first Humans to wander the Earth.

You have to do God's job. The creation method must return an array of length 2 containing objects (representing Adam and Eve). The first object in the array should be an instance of the class Man. The second should be an instance of the class Woman. Both objects have to be subclasses of Human. Your job is to implement the Human, Man and Woman classes.

# define your classes

def god
  # and return array of instances
end

My Solution

class Human; end
class Man < Human; end
class Woman < Human; end

def god
  [Man.new, Woman.new]
end