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.
141 142 143 144 145 |
# File 'lib/eve-api/eve-api.rb', line 141 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
146 147 148 149 150 151 152 |
# File 'lib/eve-api/eve-api.rb', line 146 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
153 154 155 156 157 158 159 |
# File 'lib/eve-api/eve-api.rb', line 153 def transactions transactions = [] @api.account_transactions(character.id, type, key).each do |raw_transaction| transactions << Transaction.new(raw_transaction, @api) end return transactions end |