Sha256: edc3dbe1d8aef0e3dd02c83f3729b768acb6849bfd51ef7b4660016a5adbd509

Contents?: true

Size: 734 Bytes

Versions: 2

Compression:

Stored size: 734 Bytes

Contents

# frozen_string_literal: true

require 'forwardable'

module EveOnline
  module ESI
    class UniverseConstellation < Base
      extend Forwardable

      API_ENDPOINT = 'https://esi.evetech.net/v1/universe/constellations/%<constellation_id>s/?datasource=%<datasource>s'

      attr_reader :id

      def initialize(options)
        super

        @id = options.fetch(:id)
      end

      def_delegators :model, :as_json, :constellation_id, :name, :region_id,
                     :systems, :position

      def model
        Models::Constellation.new(response)
      end
      memoize :model

      def scope; end

      def url
        format(API_ENDPOINT, constellation_id: id, datasource: datasource)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eve_online-0.20.0 lib/eve_online/esi/universe_constellation.rb
eve_online-0.19.0 lib/eve_online/esi/universe_constellation.rb