Created
March 29, 2016 17:20
-
-
Save jkarnowski/7800b5d827132420913defababd65018 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
module BreatheFire | |
def breathe_fire | |
"WOOOOOVM *sizzle* WOOOOOVM *sizzle*" | |
end | |
end | |
module ShootsLasersFromEyes | |
def shoot_lasers_from_eyes | |
"Pew pew pew!" | |
end | |
end | |
class JaclynAnimals | |
attr_reader :name | |
attr_accessor :job | |
def initialize(options = {}) | |
@name = options.fetch(:name) | |
@job = options.fetch(:job, "unemployed") | |
end | |
end | |
# An employed dog that commutes on a unicorn | |
class Dog < JaclynAnimals | |
attr_accessor :transportation | |
def initialize(options = {}) | |
super | |
@name = options.fetch(:name, "Dog Doe") | |
end | |
end | |
# a fire-breathing unicorn that shoots laser eyes and dances for a living | |
class Unicorn < JaclynAnimals | |
attr_accessor :transportation | |
include BreatheFire, ShootsLasersFromEyes | |
def initialize(options = {}) | |
super | |
@job = options.fetch(:job, "break dancer") | |
@name = options.fetch(:name, "Dog Doe") | |
end | |
end | |
# this pony breathes fire and can shapeshift while at work as a scientist | |
class ShetlandPony < JaclynAnimals | |
attr_reader :shape | |
include BreatheFire | |
def initialize(options = {}) | |
@name = options[:name] || "Pony Doe" | |
@shape = options[:shape] || "pony" | |
@job = options[:job] || "pony king" | |
end | |
def shapeshift(shape) | |
@shape = shape | |
end | |
end | |
# not only a backup dancer, but also can shoot lasers from eyes and when necessary, can have a best friend | |
class Shark < JaclynAnimals | |
attr_accessor :bestie | |
include ShootsLasersFromEyes | |
def initialize(options = {}) | |
@name = options[:name] || "Shark Dough" | |
@job = options[:job] || "Shark Week Announcer" | |
end | |
end | |
# a musically-inclined, teleporting Alien with laser eyes and a job with their best friend | |
class Alien | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment