Class: Sightstone::League
- Inherits:
-
Object
- Object
- Sightstone::League
- Defined in:
- lib/sightstone/league.rb
Instance Attribute Summary collapse
-
#entries ⇒ Array<LeagueItem>
The current value of entries.
-
#name ⇒ Object
Returns the value of attribute name.
-
#participantId ⇒ Object
Returns the value of attribute participantId.
-
#queue ⇒ Object
Returns the value of attribute queue.
-
#tier ⇒ Object
Returns the value of attribute tier.
Instance Method Summary collapse
-
#initialize(data) ⇒ League
constructor
A new instance of League.
Constructor Details
#initialize(data) ⇒ League
Returns a new instance of League.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/sightstone/league.rb', line 10 def initialize(data) @name = data['name'] @queue = data['queue'] @tier = data['tier'] @participantId = data['participantId'] @entries = [] data['entries'].each do |entry| @entries << LeagueItem.new(entry) end end |
Instance Attribute Details
#entries ⇒ Array<LeagueItem>
Returns the current value of entries.
7 8 9 |
# File 'lib/sightstone/league.rb', line 7 def entries @entries end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/sightstone/league.rb', line 8 def name @name end |
#participantId ⇒ Object
Returns the value of attribute participantId.
8 9 10 |
# File 'lib/sightstone/league.rb', line 8 def participantId @participantId end |
#queue ⇒ Object
Returns the value of attribute queue.
8 9 10 |
# File 'lib/sightstone/league.rb', line 8 def queue @queue end |
#tier ⇒ Object
Returns the value of attribute tier.
8 9 10 |
# File 'lib/sightstone/league.rb', line 8 def tier @tier end |