Class: EveAPI::Account
Instance Method Summary collapse
-
#initialize(options, api, character, type) ⇒ Account
constructor
A new instance of Account.
- #journal ⇒ Object
- #transactions ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(options, api, character, type) ⇒ Account
Returns a new instance of Account.
108 109 110 111 112 |
# File 'lib/eve-api/eve-api.rb', line 108 def initialize(, api, character, type) super(, api) [:character] = character [:type] = type end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class EveAPI::Base
Instance Method Details
#journal ⇒ Object
113 114 115 116 117 118 119 |
# File 'lib/eve-api/eve-api.rb', line 113 def journal journal = [] @api.account_journal(character.id, type, key).each do |raw_journal_entry| journal << JournalEntry.new(raw_journal_entry, @api) end return journal end |
#transactions ⇒ Object
120 121 122 123 124 125 126 |
# File 'lib/eve-api/eve-api.rb', line 120 def transactions transactions = [] @api.account_transactions(character.id, type, key).each do |raw_transaction| transactions << Transaction.new(raw_transaction, @api) end return transactions end |