Class: Concerns::EventFight
- Inherits:
-
Object
- Object
- Concerns::EventFight
- Defined in:
- lib/event_fight.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#blue_height ⇒ Object
Returns the value of attribute blue_height.
-
#blue_name ⇒ Object
Returns the value of attribute blue_name.
-
#blue_record ⇒ Object
Returns the value of attribute blue_record.
-
#blue_weight ⇒ Object
Returns the value of attribute blue_weight.
-
#event ⇒ Object
Returns the value of attribute event.
-
#fights ⇒ Object
Returns the value of attribute fights.
-
#red_height ⇒ Object
Returns the value of attribute red_height.
-
#red_name ⇒ Object
Returns the value of attribute red_name.
-
#red_record ⇒ Object
Returns the value of attribute red_record.
-
#red_weight ⇒ Object
Returns the value of attribute red_weight.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(red_name = nil, blue_name = nil, fight_hash = nil) ⇒ EventFight
constructor
A new instance of EventFight.
Constructor Details
#initialize(red_name = nil, blue_name = nil, fight_hash = nil) ⇒ EventFight
Returns a new instance of EventFight.
6 7 8 9 10 11 12 13 |
# File 'lib/event_fight.rb', line 6 def initialize(red_name = nil, blue_name = nil, fight_hash = nil) @red_name = red_name @blue_name = blue_name fight_hash.each do |key, value| self.send("#{key}=", value) end @@all << self end |
Instance Attribute Details
#blue_height ⇒ Object
Returns the value of attribute blue_height.
2 3 4 |
# File 'lib/event_fight.rb', line 2 def blue_height @blue_height end |
#blue_name ⇒ Object
Returns the value of attribute blue_name.
2 3 4 |
# File 'lib/event_fight.rb', line 2 def blue_name @blue_name end |
#blue_record ⇒ Object
Returns the value of attribute blue_record.
2 3 4 |
# File 'lib/event_fight.rb', line 2 def blue_record @blue_record end |
#blue_weight ⇒ Object
Returns the value of attribute blue_weight.
2 3 4 |
# File 'lib/event_fight.rb', line 2 def blue_weight @blue_weight end |
#event ⇒ Object
Returns the value of attribute event.
2 3 4 |
# File 'lib/event_fight.rb', line 2 def event @event end |
#fights ⇒ Object
Returns the value of attribute fights.
2 3 4 |
# File 'lib/event_fight.rb', line 2 def fights @fights end |
#red_height ⇒ Object
Returns the value of attribute red_height.
2 3 4 |
# File 'lib/event_fight.rb', line 2 def red_height @red_height end |
#red_name ⇒ Object
Returns the value of attribute red_name.
2 3 4 |
# File 'lib/event_fight.rb', line 2 def red_name @red_name end |
#red_record ⇒ Object
Returns the value of attribute red_record.
2 3 4 |
# File 'lib/event_fight.rb', line 2 def red_record @red_record end |
#red_weight ⇒ Object
Returns the value of attribute red_weight.
2 3 4 |
# File 'lib/event_fight.rb', line 2 def red_weight @red_weight end |
Class Method Details
.all ⇒ Object
15 16 17 |
# File 'lib/event_fight.rb', line 15 def self.all @@all end |
.clear ⇒ Object
19 20 21 |
# File 'lib/event_fight.rb', line 19 def self.clear @@all.clear end |