Sha256: 7a208f2b0017510b30f79788134e8a808979daf99b18f81e60e63ef282c81044

Contents?: true

Size: 690 Bytes

Versions: 2

Compression:

Stored size: 690 Bytes

Contents

# frozen_string_literal: true

require 'forwardable'

module EveOnline
  module ESI
    class UniverseRegion < Base
      extend Forwardable

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

      attr_reader :id

      def initialize(options)
        super

        @id = options.fetch(:id)
      end

      def_delegators :model, :as_json, :constellations, :description, :name,
                     :region_id

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

      def scope; end

      def url
        format(API_ENDPOINT, region_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_region.rb
eve_online-0.19.0 lib/eve_online/esi/universe_region.rb