Class: ExpBreakdown
- Inherits:
-
Object
- Object
- ExpBreakdown
- Defined in:
- lib/herostats/exp_breakdown.rb
Overview
An ExpBreakdown represents a collection of experience sources for a given minute of game time for a team
Instance Attribute Summary collapse
-
#creep ⇒ Object
Returns the value of attribute creep.
-
#hero ⇒ Object
Returns the value of attribute hero.
-
#minion ⇒ Object
Returns the value of attribute minion.
-
#structure ⇒ Object
Returns the value of attribute structure.
-
#time ⇒ Object
Returns the value of attribute time.
-
#trickle ⇒ Object
Returns the value of attribute trickle.
Instance Method Summary collapse
-
#initialize(minion, creep, structure, hero, trickle, time) ⇒ ExpBreakdown
constructor
A new instance of ExpBreakdown.
-
#total_exp ⇒ Object
Returns the total experience for this breakdown.
Constructor Details
#initialize(minion, creep, structure, hero, trickle, time) ⇒ ExpBreakdown
Returns a new instance of ExpBreakdown.
11 12 13 14 15 16 17 18 |
# File 'lib/herostats/exp_breakdown.rb', line 11 def initialize(minion, creep, structure, hero, trickle, time) @minion = minion @creep = creep @structure = structure @hero = hero @trickle = trickle @time = time end |
Instance Attribute Details
#creep ⇒ Object
Returns the value of attribute creep.
4 5 6 |
# File 'lib/herostats/exp_breakdown.rb', line 4 def creep @creep end |
#hero ⇒ Object
Returns the value of attribute hero.
5 6 7 |
# File 'lib/herostats/exp_breakdown.rb', line 5 def hero @hero end |
#minion ⇒ Object
Returns the value of attribute minion.
6 7 8 |
# File 'lib/herostats/exp_breakdown.rb', line 6 def minion @minion end |
#structure ⇒ Object
Returns the value of attribute structure.
7 8 9 |
# File 'lib/herostats/exp_breakdown.rb', line 7 def structure @structure end |
#time ⇒ Object
Returns the value of attribute time.
9 10 11 |
# File 'lib/herostats/exp_breakdown.rb', line 9 def time @time end |
#trickle ⇒ Object
Returns the value of attribute trickle.
8 9 10 |
# File 'lib/herostats/exp_breakdown.rb', line 8 def trickle @trickle end |
Instance Method Details
#total_exp ⇒ Object
Returns the total experience for this breakdown
21 22 23 |
# File 'lib/herostats/exp_breakdown.rb', line 21 def total_exp @minion + @creep + @structure + @hero + @trickle end |