Sha256: ec9a31ebf1d2fd3dc394cf7fc5a92f68a34bdbd56b675319b6cf1a4bc0e8c355

Contents?: true

Size: 391 Bytes

Versions: 28

Compression:

Stored size: 391 Bytes

Contents

# frozen_string_literal: true

module BeyondApi
  class Base
    class InvalidSessionError < StandardError; end

    attr_reader :session

    def initialize(session)
      @session = session

      raise InvalidSessionError, "Invalid session" unless session.is_a? BeyondApi::Session
      raise InvalidSessionError, "Session api_url cannot be nil" if session.api_url.nil?
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
beyond_api-0.12.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.11.1.pre lib/beyond_api/resources/base.rb
beyond_api-0.11.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.10.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.9.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.8.1.pre lib/beyond_api/resources/base.rb
beyond_api-0.8.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.7.1.pre lib/beyond_api/resources/base.rb