Class: RebelLegion::Costume
- Inherits:
-
Object
- Object
- RebelLegion::Costume
- Defined in:
- lib/rebel_legion/costume.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#costume_category ⇒ Object
Returns the value of attribute costume_category.
-
#details ⇒ Object
probably a bunch more.
-
#name ⇒ Object
probably a bunch more.
-
#url ⇒ Object
probably a bunch more.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, costume_category, url) ⇒ Costume
constructor
A new instance of Costume.
- #view_details ⇒ Object
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_category ⇒ Object
Returns the value of attribute costume_category.
3 4 5 |
# File 'lib/rebel_legion/costume.rb', line 3 def costume_category @costume_category end |
#details ⇒ Object
probably a bunch more
2 3 4 |
# File 'lib/rebel_legion/costume.rb', line 2 def details @details end |
#name ⇒ Object
probably a bunch more
2 3 4 |
# File 'lib/rebel_legion/costume.rb', line 2 def name @name end |
#url ⇒ Object
probably a bunch more
2 3 4 |
# File 'lib/rebel_legion/costume.rb', line 2 def url @url end |
Class Method Details
.all ⇒ Object
15 16 17 |
# File 'lib/rebel_legion/costume.rb', line 15 def self.all @@all end |
Instance Method Details
#view_details ⇒ Object
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 |