Sha256: b247614b097596a29b1f99501853dc95810e6117f7e77d86d86e405c8577679a

Contents?: true

Size: 1.79 KB

Versions: 16

Compression:

Stored size: 1.79 KB

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    module Models
      class Type < Base
        def as_json
          {
            capacity: capacity,
            description: description,
            graphic_id: graphic_id,
            group_id: group_id,
            icon_id: icon_id,
            market_group_id: market_group_id,
            mass: mass,
            name: name,
            packaged_volume: packaged_volume,
            portion_size: portion_size,
            published: published,
            radius: radius,
            type_id: type_id,
            volume: volume
          }
        end

        def capacity
          options["capacity"]
        end

        def description
          options["description"]
        end

        def graphic_id
          options["graphic_id"]
        end

        def group_id
          options["group_id"]
        end

        def icon_id
          options["icon_id"]
        end

        def market_group_id
          options["market_group_id"]
        end

        def mass
          options["mass"]
        end

        def name
          options["name"]
        end

        def packaged_volume
          options["packaged_volume"]
        end

        def portion_size
          options["portion_size"]
        end

        def published
          options["published"]
        end

        def radius
          options["radius"]
        end

        def type_id
          options["type_id"]
        end

        def volume
          options["volume"]
        end

        def dogma_attributes
          @dogma_attributes ||= DogmaAttributes.new(options["dogma_attributes"]).dogma_attributes
        end

        def dogma_effects
          @dogma_effects ||= DogmaEffects.new(options["dogma_effects"]).dogma_effects
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
eve_online-0.46.0 lib/eve_online/esi/models/type.rb
eve_online-0.45.0 lib/eve_online/esi/models/type.rb
eve_online-0.44.0 lib/eve_online/esi/models/type.rb
eve_online-0.43.0 lib/eve_online/esi/models/type.rb
eve_online-0.42.0 lib/eve_online/esi/models/type.rb
eve_online-0.41.0 lib/eve_online/esi/models/type.rb
eve_online-0.40.0 lib/eve_online/esi/models/type.rb
eve_online-0.39.0 lib/eve_online/esi/models/type.rb
eve_online-0.38.0 lib/eve_online/esi/models/type.rb
eve_online-0.37.0 lib/eve_online/esi/models/type.rb
eve_online-0.36.0 lib/eve_online/esi/models/type.rb
eve_online-0.35.1 lib/eve_online/esi/models/type.rb
eve_online-0.35.0 lib/eve_online/esi/models/type.rb
eve_online-0.34.0 lib/eve_online/esi/models/type.rb
eve_online-0.33.0 lib/eve_online/esi/models/type.rb
eve_online-0.32.0 lib/eve_online/esi/models/type.rb