Class: LeagueOfLegends::DTO::Champion

Inherits:
Object
  • Object
show all
Defined in:
lib/league_of_legends/dto/champion.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Champion



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/league_of_legends/dto/champion.rb', line 14

def initialize attributes
  return if attributes.nil?

  @active = attributes[:active]
  @attack_rank = attributes[:attackRank]
  @bot_enabled = attributes[:botEnabled]
  @bot_mm_enabled = attributes[:botMmEnabled]
  @defense_rank = attributes[:defenseRank]
  @difficulty_rank = attributes[:difficultyRank]
  @free_to_play = attributes[:freeToPlay]
  @id = attributes[:id]
  @magic_rank = attributes[:magicRank]
  @name = attributes[:name]
  @ranked_play_enabled = attributes[:rankedPlayEnabled]
end

Instance Attribute Details

#activeObject (readonly)

Returns the value of attribute active.



9
10
11
# File 'lib/league_of_legends/dto/champion.rb', line 9

def active
  @active
end

#attack_rankObject (readonly)

Returns the value of attribute attack_rank.



9
10
11
# File 'lib/league_of_legends/dto/champion.rb', line 9

def attack_rank
  @attack_rank
end

#bot_enabledObject (readonly)

Returns the value of attribute bot_enabled.



9
10
11
# File 'lib/league_of_legends/dto/champion.rb', line 9

def bot_enabled
  @bot_enabled
end

#bot_mm_enabledObject (readonly)

Returns the value of attribute bot_mm_enabled.



9
10
11
# File 'lib/league_of_legends/dto/champion.rb', line 9

def bot_mm_enabled
  @bot_mm_enabled
end

#defense_rankObject (readonly)

Returns the value of attribute defense_rank.



9
10
11
# File 'lib/league_of_legends/dto/champion.rb', line 9

def defense_rank
  @defense_rank
end

#difficulty_rankObject (readonly)

Returns the value of attribute difficulty_rank.



9
10
11
# File 'lib/league_of_legends/dto/champion.rb', line 9

def difficulty_rank
  @difficulty_rank
end

#free_to_playObject (readonly)

Returns the value of attribute free_to_play.



9
10
11
# File 'lib/league_of_legends/dto/champion.rb', line 9

def free_to_play
  @free_to_play
end

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/league_of_legends/dto/champion.rb', line 9

def id
  @id
end

#magic_rankObject (readonly)

Returns the value of attribute magic_rank.



9
10
11
# File 'lib/league_of_legends/dto/champion.rb', line 9

def magic_rank
  @magic_rank
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/league_of_legends/dto/champion.rb', line 9

def name
  @name
end

#ranked_play_enabledObject (readonly)

Returns the value of attribute ranked_play_enabled.



9
10
11
# File 'lib/league_of_legends/dto/champion.rb', line 9

def ranked_play_enabled
  @ranked_play_enabled
end

Class Method Details

.versionObject



5
6
7
# File 'lib/league_of_legends/dto/champion.rb', line 5

def self.version
  ::LeagueOfLegends::DTO::ChampionList.version
end