Class: Sightstone::League

Inherits:
Object
  • Object
show all
Defined in:
lib/sightstone/league.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#entriesArray<LeagueItem>

Returns the current value of entries.

Returns:

  • (Array<LeagueItem>)

    the current value of entries



7
8
9
# File 'lib/sightstone/league.rb', line 7

def entries
  @entries
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/sightstone/league.rb', line 8

def name
  @name
end

#participantIdObject

Returns the value of attribute participantId.



8
9
10
# File 'lib/sightstone/league.rb', line 8

def participantId
  @participantId
end

#queueObject

Returns the value of attribute queue.



8
9
10
# File 'lib/sightstone/league.rb', line 8

def queue
  @queue
end

#tierObject

Returns the value of attribute tier.



8
9
10
# File 'lib/sightstone/league.rb', line 8

def tier
  @tier
end