Class: EveOnline::ESI::Models::Planet

Inherits:
Base
  • Object
show all
Defined in:
lib/eve_online/esi/models/planet.rb

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from EveOnline::ESI::Models::Base

Instance Method Details

#as_jsonObject



7
8
9
10
11
12
13
14
# File 'lib/eve_online/esi/models/planet.rb', line 7

def as_json
  {
    name: name,
    planet_id: planet_id,
    system_id: system_id,
    type_id: type_id
  }
end

#nameObject



16
17
18
# File 'lib/eve_online/esi/models/planet.rb', line 16

def name
  options["name"]
end

#planet_idObject



20
21
22
# File 'lib/eve_online/esi/models/planet.rb', line 20

def planet_id
  options["planet_id"]
end

#positionObject



32
33
34
# File 'lib/eve_online/esi/models/planet.rb', line 32

def position
  @position ||= Position.new(options["position"])
end

#system_idObject



24
25
26
# File 'lib/eve_online/esi/models/planet.rb', line 24

def system_id
  options["system_id"]
end

#type_idObject



28
29
30
# File 'lib/eve_online/esi/models/planet.rb', line 28

def type_id
  options["type_id"]
end