Logo
Learn Ruby In Orbit
Menu
Public Planet Blueprints
What's New
Log In
Sign Up
Planet Blueprint #42
Andrew's Code
module LifeForms def species "Humans" end end module Advancements def transportation "Rockets" end end class Planet include LifeForms include Advancements attr_reader :planet_species, :planet_transportation def initialize @color = 'yellow' @size = 'xl' @rings = true @atmosphere = 'gaseous' @planet_species = species # Using method from LifeForms module @planet_transportation = transportation # Using method from Advancements module end def is_habitable? true end def species_type "aliens" end end
Generated Planet