Class: EveOnline::ESI::Models::Stargate

Inherits:
Base
  • Object
show all
Defined in:
lib/eve_online/esi/models/stargate.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
15
16
# File 'lib/eve_online/esi/models/stargate.rb', line 7

def as_json
  {
    name: name,
    stargate_id: stargate_id,
    system_id: system_id,
    type_id: type_id,
    destination_stargate_id: destination_stargate_id,
    destination_system_id: destination_system_id
  }
end

#destination_stargate_idObject



34
35
36
# File 'lib/eve_online/esi/models/stargate.rb', line 34

def destination_stargate_id
  options.dig("destination", "stargate_id")
end

#destination_system_idObject



38
39
40
# File 'lib/eve_online/esi/models/stargate.rb', line 38

def destination_system_id
  options.dig("destination", "system_id")
end

#nameObject



18
19
20
# File 'lib/eve_online/esi/models/stargate.rb', line 18

def name
  options["name"]
end

#positionObject



42
43
44
# File 'lib/eve_online/esi/models/stargate.rb', line 42

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

#stargate_idObject



22
23
24
# File 'lib/eve_online/esi/models/stargate.rb', line 22

def stargate_id
  options["stargate_id"]
end

#system_idObject



26
27
28
# File 'lib/eve_online/esi/models/stargate.rb', line 26

def system_id
  options["system_id"]
end

#type_idObject



30
31
32
# File 'lib/eve_online/esi/models/stargate.rb', line 30

def type_id
  options["type_id"]
end