Sha256: b84db4de4c465482b03c1cb5cafb2f75acf869a3ad8c626c7735534b65ada199

Contents?: true

Size: 477 Bytes

Versions: 1

Compression:

Stored size: 477 Bytes

Contents

require 'open-uri'
require 'memoist'

module EveOnline
  class Base
    extend Memoist

    def url
      raise NotImplementedError
    end

    def user_agent
      "EveOnline API (https://github.com/biow0lf/eve_online) v#{ VERSION }"
    end

    def content
      open(url, open_timeout: 60, read_timeout: 60,
                'User-Agent' => user_agent).read
    end
    memoize :content

    def response
      parser.parse(content)
    end
    memoize :response
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eve_online-0.9.0 lib/eve_online/base.rb