Class: Warcraft::Fragments::AccountCharacterFragment

Inherits:
Warcraft::Fragment show all
Defined in:
lib/warcraft/fragments/account_character_fragment.rb

Instance Method Summary collapse

Methods inherited from Warcraft::Fragment

#initialize

Constructor Details

This class inherits a constructor from Warcraft::Fragment

Instance Method Details

#characterObject



6
7
8
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 6

def character
  link
end

#factionObject



58
59
60
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 58

def faction
  @dig.dig(:faction, :type)
end

#genderObject



54
55
56
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 54

def gender
  @dig.dig(:gender, :type)
end

#idObject



18
19
20
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 18

def id
  @data[:id]
end

#levelObject



62
63
64
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 62

def level
  @dig[:level]
end

#nameObject



14
15
16
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 14

def name
  @data[:name]
end

#playable_class_idObject



42
43
44
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 42

def playable_class_id
  @data.dig(:playable_class, :id)
end

#playable_class_urlObject



38
39
40
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 38

def playable_class_url
  @data.dig(:playable_class, :key, :href)
end

#playable_race_idObject



50
51
52
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 50

def playable_race_id
  @data.dig(:playable_race, :id)
end

#playable_race_urlObject



46
47
48
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 46

def playable_race_url
  @data.dig(:playable_race, :key, :href)
end

#protected_characterObject



10
11
12
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 10

def protected_character
  link
end

#realm_idObject



30
31
32
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 30

def realm_id
  @data.dig(:realm, :id)
end

#realm_nameObject



26
27
28
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 26

def realm_name
  @data.dig(:realm, :name)
end

#realm_slugObject



34
35
36
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 34

def realm_slug
  @data.dig(:realm, :slug)
end

#realm_urlObject



22
23
24
# File 'lib/warcraft/fragments/account_character_fragment.rb', line 22

def realm_url
  @data.dig(:realm, :key, :href)
end