class RebelLegion::Costume
Attributes
costume_category[R]
details[RW]
name[RW]
url[RW]
Public Class Methods
all()
click to toggle source
# File lib/rebel_legion/costume.rb, line 15 def self.all @@all end
new(name, costume_category, url)
click to toggle source
# File lib/rebel_legion/costume.rb, line 7 def initialize(name, costume_category, url) @name = name self.costume_category = costume_category @url = url @details = [] @@all << self end
Public Instance Methods
costume_category=(category)
click to toggle source
# File lib/rebel_legion/costume.rb, line 19 def costume_category=(category) @costume_category = category category.add_costume(self) end
view_details()
click to toggle source
# File lib/rebel_legion/costume.rb, line 24 def view_details details.each.with_index(1) do |detail, i| puts "#{i}. ".colorize(:yellow) + "#{detail}" end puts "For more info, visit #{url.colorize(:light_cyan)}" end