Class: Summoner

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

Overview

Class to represent a summoner

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Summoner) initialize(data)

Returns a new instance of Summoner

Parameters:

  • data (Hash)

    json hash representation of the summoner



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

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

Instance Attribute Details

- (Long) id

summoner id (used for other calls)

Returns:

  • (Long)

    the current value of id



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

def id
  @id
end

- (Integer) level

summoner level

Returns:

  • (Integer)

    the current value of level



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

def level
  @level
end

- (String) name

name

Returns:

  • (String)

    the current value of name



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

def name
  @name
end

- (Integer) profileIconId

profile icon id of the summoner

Returns:

  • (Integer)

    the current value of profileIconId



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

def profileIconId
  @profileIconId
end

- (long) revisionDate

timestamp of latest data change

Returns:

  • (long)

    the current value of revisionDate



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

def revisionDate
  @revisionDate
end