Class: EveCrest::Response::SolarSystem
Instance Attribute Summary
Attributes inherited from BaseResponse
#data
Instance Method Summary
collapse
#cached_until, #error_message, #initialize, #raw, #success?
Instance Method Details
#constellation ⇒ Object
39
40
41
|
# File 'lib/responses/solar_system.rb', line 39
def constellation
data['constellation']['id']
end
|
#moons ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/responses/solar_system.rb', line 18
def moons
_moons = Array.new
data['planets'].each do |p|
_moons.push(p['moons'].to_s.split('/')[4].to_i)
end
_moons
end
|
#name ⇒ Object
4
5
6
|
# File 'lib/responses/solar_system.rb', line 4
def name
data['name']
end
|
#planets ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'lib/responses/solar_system.rb', line 10
def planets
_planets = Array.new
data['planets'].each do |p|
_planets.push(p['href'].to_s.split('/')[4].to_i)
end
_planets
end
|
#position ⇒ Object
7
8
9
|
# File 'lib/responses/solar_system.rb', line 7
def position
data['position']
end
|
#security_level ⇒ Object
32
33
34
|
# File 'lib/responses/solar_system.rb', line 32
def security_level
data['securityStatus']
end
|
#sovereignty ⇒ Object
35
36
37
|
# File 'lib/responses/solar_system.rb', line 35
def sovereignty
data['sovereignty']['id']
end
|
#stargates ⇒ Object
25
26
27
28
29
30
31
|
# File 'lib/responses/solar_system.rb', line 25
def stargates
_stargates = Array.new
data['stargates'].each do |s|
_stargates.push(s['id'])
end
_stargates
end
|