Class: Warcraft::Fragments::CharacterFragment

Inherits:
Warcraft::Fragment show all
Defined in:
lib/warcraft/fragments/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

#idObject



11
12
13
# File 'lib/warcraft/fragments/character_fragment.rb', line 11

def id
  @data[:id]
end

#realmObject



19
20
21
# File 'lib/warcraft/fragments/character_fragment.rb', line 19

def realm
  # TODO: Localised resource
end

#slugObject



15
16
17
# File 'lib/warcraft/fragments/character_fragment.rb', line 15

def slug
  @data[:slug]
end

#urlString

Returns:

  • (String)


7
8
9
# File 'lib/warcraft/fragments/character_fragment.rb', line 7

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