Class: RebelLegion::Costume

Inherits:
Object
  • Object
show all
Defined in:
lib/rebel_legion/costume.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, costume_category, url) ⇒ Costume

Returns a new instance of Costume.



7
8
9
10
11
12
13
# 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

Instance Attribute Details

#costume_categoryObject

Returns the value of attribute costume_category.



3
4
5
# File 'lib/rebel_legion/costume.rb', line 3

def costume_category
  @costume_category
end

#detailsObject

probably a bunch more



2
3
4
# File 'lib/rebel_legion/costume.rb', line 2

def details
  @details
end

#nameObject

probably a bunch more



2
3
4
# File 'lib/rebel_legion/costume.rb', line 2

def name
  @name
end

#urlObject

probably a bunch more



2
3
4
# File 'lib/rebel_legion/costume.rb', line 2

def url
  @url
end

Class Method Details

.allObject



15
16
17
# File 'lib/rebel_legion/costume.rb', line 15

def self.all
  @@all
end

Instance Method Details

#view_detailsObject



24
25
26
27
28
29
30
31
# File 'lib/rebel_legion/costume.rb', line 24

def view_details
  i = 0
  details.each do |detail|
    i += 1
    puts "#{i}. ".colorize(:yellow) + "#{detail}"
  end
  puts "For more info, visit #{url.colorize(:light_cyan)}"
end