Class: Sightstone::Summoner

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Summoner

Returns a new instance of Summoner.

Parameters:

  • data (Hash)

    json hash representation of the summoner



13
14
15
16
17
18
19
# File 'lib/sightstone/summoner.rb', line 13

def initialize(data)
   @name = data['name']
   @id =  data['id']
   @profileIconId =  data['profileIconId']
   @revisionDate =  data['revisionDate']
   @level =  data['summonerLevel']
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



10
11
12
# File 'lib/sightstone/summoner.rb', line 10

def id
  @id
end

#levelInteger

summoner level

Returns:

  • (Integer)

    the current value of level



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

def level
  @level
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/sightstone/summoner.rb', line 10

def name
  @name
end

#profileIconIdObject

Returns the value of attribute profileIconId.



10
11
12
# File 'lib/sightstone/summoner.rb', line 10

def profileIconId
  @profileIconId
end

#revisionDateObject

Returns the value of attribute revisionDate.



10
11
12
# File 'lib/sightstone/summoner.rb', line 10

def revisionDate
  @revisionDate
end