Class: Warcraft::Account::WowAccount

Inherits:
Object
  • Object
show all
Defined in:
lib/warcraft/account/profile.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, data) ⇒ WowAccount

Returns a new instance of WowAccount.



24
25
26
27
# File 'lib/warcraft/account/profile.rb', line 24

def initialize(client, data)
  @client = client
  @data = data
end

Instance Method Details

#charactersArray<Warcraft::Fragments::AccountCharacterFragment>



36
37
38
# File 'lib/warcraft/account/profile.rb', line 36

def characters
  @characters ||= @data[:characters].map { |c| Fragments::AccountCharacterFragment.new(@client, c) }
end

#idInteger

The WoW account ID

Returns:

  • (Integer)


31
32
33
# File 'lib/warcraft/account/profile.rb', line 31

def id
  @data[:id]
end