svmartin
1/27/2017 - 5:39 PM

person.rb

module Pilotable
  def pilot_plane
    "...can fly planes."
  end
end

module InAirCertified
  def in_air_certified
    "...can help with in-air emergencies."
  end
end

module CustomerCertified
  def customer_certified
    "...can help public customers."
  end
end

module Operateable
  def operate_ground_vehicles
    "...can operate ground vehicles"
  end
end

module Arrestable
  def arrest
    "...can arrest people."
  end
end

module Payable
  def receive_pay
    "...can be paid."
  end
end

class Person
  def initialize(name)
    @name = name
  end
end

class Employee < Person
  include Payable

  def initialize(name, id)
    super(name)
    @id = id
  end
end

class Pilot < Employee
  include Pilotable
  include InAirCertified
  include CustomerCertified
end

class FlightAttendantTrainee < Employee
  include CustomerCertified
end

class FlightAttendant < FlightAttendantTrainee
  include InAirCertified
end

class Manager < Employee
  include CustomerCertified
  include Operateable
end

class CounterAttendant < Employee
  include CustomerCertified
end

class GroundCrew < Employee
  include Operateable
end

class GovernmentAuthorizedPersonnel < Person
  include Arrestable
  include Operateable
  include Pilotable
end