Logo
Learn Ruby In Orbit
Menu
Public Planet Blueprints
What's New
Log In
Sign Up
Public Planet Blueprints
Create your own Planet Blueprint
Create your own Planet Blueprint
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
Andrew's Code
class Planet def initialize @color = 'red' @size = 'very big' @rings = true @atmosphere = 'airy' end def is_habitable? true end def species_type "human" end end
Generated Planet
Andrew's Code
class Planet def initialize @color = 'yellow' @size = 'xl' @rings = true @number_of_rings = 3 @atmosphere = 'gaseous storms' @number_of_moons = 4 end def is_habitable? true end def species_type "aliens" end end
Generated Planet
Andrew's Code
module PlanetDetails def planet_name "Planet X" end def planet_distance_from_sun "4.2 light years" end def planet_color "Blue" end def planet_atmosphere "Oxygen-rich" end def planet_size "Large" end def planet_rings true end end class TechnologicalPlanet include AI include Robotics include PlanetDetails attr_reader :dominant_technology, :dominant_inhabitants, :name, :distance_from_sun, :color, :atmosphere, :size, :rings def initialize @dominant_technology = dominant_technology @dominant_inhabitants = dominant_inhabitants @name = planet_name @distance_from_sun = planet_distance_from_sun @color = planet_color @atmosphere = planet_atmosphere @size = planet_size @rings = planet_rings end end
Generated Planet
Andrew's Code
class NightPlanet < Planet def initialize super @color = 'dark purple' @size = 'm' @atmosphere = 'thin, luminescent mist' end def is_habitable? true end def species_type "nocturnal beings" end end
Generated Planet
Andrew's Code
class Planet def initialize @color = 'yellow' @size = 'xl' @rings = true @atmosphere = 'gaseous' end def is_habitable? false end def species_type "aliens" end def photo_realistic_description desc = [] desc << "The planet has a #{@color} hue." desc << "It is #{@size} in size." desc << "The atmosphere is mainly #{@atmosphere}." desc << (@rings ? "It has rings orbiting around it." : "It doesn't have any rings.") desc << "Is it habitable? #{is_habitable? ? 'Yes' : 'No'}." desc << "Dominant species: #{species_type}." desc.join(' ') end end
Generated Planet
Andrew's Code
class Planet def initialize @color = 'yellow' @size = 'xl' @rings = true @atmosphere = 'gaseous' end def is_habitable? false end def species_type "aliens" end def photo_realistic_description desc = [] desc << "The planet has a #{@color} hue." desc << "It is #{@size} in size." desc << "The atmosphere is mainly #{@atmosphere}." desc << (@rings ? "It has rings orbiting around it." : "It doesn't have any rings.") desc << "Is it habitable? #{is_habitable? ? 'Yes' : 'No'}." desc << "Dominant species: #{species_type}." desc.join(' ') end end
Generated Planet
Andrew's Code
class Planet def initialize @color = 'yellow' @size = 'xl' @rings = true @atmosphere = 'gaseous' end def is_habitable? false end def species_type "aliens" end def realistic_description desc = [] desc << "The planet has a #{@color} hue." desc << "It is #{@size} in size." desc << "The atmosphere is mainly #{@atmosphere}." desc << (@rings ? "It has rings orbiting around it." : "It doesn't have any rings.") desc << "Is it habitable? #{is_habitable? ? 'Yes' : 'No'}." desc << "Dominant species: #{species_type}." desc.join(' ') end end
Generated Planet
Andrew's Code
class SteamPunkPlanet < Planet def initialize super @color = 'rust and gold' @size = 'm' @atmosphere = 'thick, smoggy' end def is_habitable? true end def species_type "clockwork beings" end end
Generated Planet
Andrew's Code
class NightPlanet < Planet def initialize super @color = 'dark purple' @size = 'm' @atmosphere = 'thin, luminescent mist' end def is_habitable? true end def species_type "nocturnal beings" end end
Generated Planet
Andrew's Code
class GasGiantPlanet < Planet def initialize super @color = 'orange' @size = 'xxl' @atmosphere = 'mostly helium and hydrogen' end def is_habitable? false end def species_type "unknown" end end
Generated Planet
Andrew's Code
class Planet def initialize @color = 'orange' @size = 'med' @rings = false @atmosphere = 'None' end def is_habitable? true end def species_type "aliens" end end
Generated Planet
Andrew's Code
module PlanetDetails def planet_name "Planet X" end def planet_distance_from_sun "4.2 light years" end def planet_color "Blue" end def planet_atmosphere "Oxygen-rich" end def planet_size "Large" end def planet_rings true end end class TechnologicalPlanet include AI include Robotics include PlanetDetails attr_reader :dominant_technology, :dominant_inhabitants, :name, :distance_from_sun, :color, :atmosphere, :size, :rings def initialize @dominant_technology = dominant_technology @dominant_inhabitants = dominant_inhabitants @name = planet_name @distance_from_sun = planet_distance_from_sun @color = planet_color @atmosphere = planet_atmosphere @size = planet_size @rings = planet_rings end end
Generated Planet
Andrew's Code
module AquaticFlora def dominant_plants "Seaweeds" end end module AquaticFauna def dominant_animals "Fish" end end class AquaticPlanet include AquaticFlora include AquaticFauna attr_reader :planet_dominant_plants, :planet_dominant_animals def initialize @planet_dominant_plants = dominant_plants @planet_dominant_animals = dominant_animals end end
Generated Planet
Andrew's Code
class MagicPlanet def initialize @terrain = 'mystical' @color = 'crystal' end def has_wizards? true end end
Generated Planet
Andrew's Code
class IcePlanet def initialize @terrain = 'icy' @color = 'white' end def has_glaciers? true end end
Generated Planet
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
Andrew's Code
class Planet def initialize @color = 'yellow' @size = 'xl' @rings = true @atmosphere = 'gaseous' end def is_habitable? false end def species_type "aliens" end end
Generated Planet
Andrew's Code
class RockPlanet def initialize @color = 'blue and gold' @size = 'small' @rings = true @number_of_rings = 2 @atmosphere = 'gaseous' end end
Generated Planet
Andrew's Code
class Planet def initialize @color = 'red' @size = 'very big' @rings = true @atmosphere = 'airy' end def is_habitable? true end def species_type "human" end end
Generated Planet
Create your first Planet Blueprint
New Planet Blueprint
‹ Prev
1
2
3
Next ›