Class: EveOnline::ESI::Models::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/eve_online/esi/models/type.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?

Methods included from ParsedHeaders

#cache_status, #error_limit_remain, #error_limit_reset, #etag, #ratelimit_group, #ratelimit_limit, #ratelimit_remaining, #ratelimit_used, #request_id, #total_pages

Constructor Details

This class inherits a constructor from EveOnline::ESI::Object

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class EveOnline::ESI::Object

Instance Method Details

#as_jsonObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/eve_online/esi/models/type.rb', line 7

def as_json
  {
    capacity: attributes.capacity,
    description: attributes.description,
    graphic_id: attributes.graphic_id,
    group_id: attributes.group_id,
    icon_id: attributes.icon_id,
    market_group_id: attributes.market_group_id,
    mass: attributes.mass,
    name: attributes.name,
    packaged_volume: attributes.packaged_volume,
    portion_size: attributes.portion_size,
    published: attributes.published,
    radius: attributes.radius,
    type_id: attributes.type_id,
    volume: attributes.volume
  }
end

#dogma_attributesObject



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

def dogma_attributes
  @dogma_attributes ||= Collection.from_array(attributes.dogma_attributes || [], type: DogmaAttributeShort)
end

#dogma_effectsObject



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

def dogma_effects
  @dogma_effects ||= Collection.from_array(attributes.dogma_effects || [], type: DogmaEffectShort)
end