Class: RiotKit::Models::Riot::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/riot_kit/models/riot/account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(puuid:, game_name:, tag_line:) ⇒ Account

Returns a new instance of Account.



9
10
11
12
13
# File 'lib/riot_kit/models/riot/account.rb', line 9

def initialize(puuid:, game_name:, tag_line:)
  @puuid = puuid
  @game_name = game_name
  @tag_line = tag_line
end

Instance Attribute Details

#game_nameObject (readonly)

Returns the value of attribute game_name.



7
8
9
# File 'lib/riot_kit/models/riot/account.rb', line 7

def game_name
  @game_name
end

#puuidObject (readonly)

Returns the value of attribute puuid.



7
8
9
# File 'lib/riot_kit/models/riot/account.rb', line 7

def puuid
  @puuid
end

#tag_lineObject (readonly)

Returns the value of attribute tag_line.



7
8
9
# File 'lib/riot_kit/models/riot/account.rb', line 7

def tag_line
  @tag_line
end

Instance Method Details

#display_riot_idObject



19
20
21
# File 'lib/riot_kit/models/riot/account.rb', line 19

def display_riot_id
  "#{game_name}##{tag_line}"
end

#to_hObject



15
16
17
# File 'lib/riot_kit/models/riot/account.rb', line 15

def to_h
  { puuid: puuid, game_name: game_name, tag_line: tag_line }
end