Class: EveAPI::Corporation
Instance Method Summary collapse
- #accounts ⇒ Object
-
#initialize(options, api, character) ⇒ Corporation
constructor
A new instance of Corporation.
- #members ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(options, api, character) ⇒ Corporation
Returns a new instance of Corporation.
119 120 121 122 123 |
# File 'lib/eve-api/eve-api.rb', line 119 def initialize(, api, character) super(, api) [:character] = character @character = character end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class EveAPI::Base
Instance Method Details
#accounts ⇒ Object
124 125 126 127 128 129 130 |
# File 'lib/eve-api/eve-api.rb', line 124 def accounts accounts = [] @api.account_balances(@character.id, :corp).each do |raw_account| accounts << Account.new(raw_account, @api, @character, :corp) end return accounts end |
#members ⇒ Object
131 132 133 134 135 136 137 |
# File 'lib/eve-api/eve-api.rb', line 131 def members members = [] @api.member_tracking(@character.id).each do |raw_member_id, raw_member| members << Member.new(raw_member, @api) end return members end |