Class: EveOnline::ESI::Models::System
- Inherits:
-
Object
- Object
- Object
- EveOnline::ESI::Models::System
show all
- Defined in:
- lib/eve_online/esi/models/system.rb
Instance Attribute Summary
Attributes inherited from Object
#attributes, #body, #headers
Instance Method Summary
collapse
Methods inherited from Object
#initialize, #method_missing, #respond_to_missing?
#cache_status, #error_limit_remain, #error_limit_reset, #etag, #ratelimit_group, #ratelimit_limit, #ratelimit_remaining, #ratelimit_used, #request_id, #total_pages
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class EveOnline::ESI::Object
Instance Method Details
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/eve_online/esi/models/system.rb', line 7
def as_json
{
constellation_id: attributes.constellation_id,
name: attributes.name,
security_class: attributes.security_class,
security_status: attributes.security_status,
star_id: attributes.star_id,
system_id: attributes.system_id
}
end
|
26
27
28
|
# File 'lib/eve_online/esi/models/system.rb', line 26
def planets
@planets ||= Collection.from_array(attributes.planets || [], type: PlanetShort)
end
|
18
19
20
|
# File 'lib/eve_online/esi/models/system.rb', line 18
def position
@position ||= Position.new(attributes: attributes.position)
end
|
#stargate_ids ⇒ Object
30
31
32
|
# File 'lib/eve_online/esi/models/system.rb', line 30
def stargate_ids
attributes.stargates || []
end
|
#station_ids ⇒ Object
22
23
24
|
# File 'lib/eve_online/esi/models/system.rb', line 22
def station_ids
attributes.stations || []
end
|