Class: ExpBreakdown

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#creepObject

Returns the value of attribute creep.



4
5
6
# File 'lib/herostats/exp_breakdown.rb', line 4

def creep
  @creep
end

#heroObject

Returns the value of attribute hero.



5
6
7
# File 'lib/herostats/exp_breakdown.rb', line 5

def hero
  @hero
end

#minionObject

Returns the value of attribute minion.



6
7
8
# File 'lib/herostats/exp_breakdown.rb', line 6

def minion
  @minion
end

#structureObject

Returns the value of attribute structure.



7
8
9
# File 'lib/herostats/exp_breakdown.rb', line 7

def structure
  @structure
end

#timeObject

Returns the value of attribute time.



9
10
11
# File 'lib/herostats/exp_breakdown.rb', line 9

def time
  @time
end

#trickleObject

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_expObject

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