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.24.3.pre lib/beyond_api/resources/base.rb
beyond_api-0.24.2.pre lib/beyond_api/resources/base.rb
beyond_api-0.24.1.pre lib/beyond_api/resources/base.rb
beyond_api-0.24.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.23.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.22.2.pre lib/beyond_api/resources/base.rb
beyond_api-0.22.1.pre lib/beyond_api/resources/base.rb
beyond_api-0.22.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.21.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.20.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.19.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.18.2.pre lib/beyond_api/resources/base.rb
beyond_api-0.18.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.17.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.16.1.pre lib/beyond_api/resources/base.rb
beyond_api-0.16.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.15.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.14.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.13.0.pre lib/beyond_api/resources/base.rb
beyond_api-0.12.1.pre lib/beyond_api/resources/base.rb