Class: Warcraft::Account::WowAccount
- Inherits:
-
Object
- Object
- Warcraft::Account::WowAccount
- Defined in:
- lib/warcraft/account/profile.rb
Instance Method Summary collapse
- #characters ⇒ Array<Warcraft::Fragments::AccountCharacterFragment>
-
#id ⇒ Integer
The WoW account ID.
-
#initialize(client, data) ⇒ WowAccount
constructor
A new instance of WowAccount.
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
#characters ⇒ Array<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 |
#id ⇒ Integer
The WoW account ID
31 32 33 |
# File 'lib/warcraft/account/profile.rb', line 31 def id @data[:id] end |