Sha256: 1978efe03bd62a3afa2ed3638e98dcd45fd9b6edf9b2a8bfe0c6a1d3e8c4ec89

Contents?: true

Size: 719 Bytes

Versions: 10

Compression:

Stored size: 719 Bytes

Contents

# encoding: utf-8

module GoodData
  module Rest
    # Base class dealing with REST endpoints
    #
    # MUST Be interface for objects dealing with REST endpoints
    # MUST provide way to work with remote REST-like API in unified manner.
    # MUST NOT create new connections.
    class Object
      attr_writer :client
      attr_accessor :project

      def initialize(_opts = {})
        @client = nil
      end

      def client(opts = {})
        @client || GoodData::Rest::Object.client(opts)
      end

      class << self
        def default_client
        end

        def client(opts = { :client => GoodData.connection })
          opts[:client] # || GoodData.client
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gooddata-0.6.20 lib/gooddata/rest/object.rb
gooddata-0.6.19 lib/gooddata/rest/object.rb
gooddata-0.6.18 lib/gooddata/rest/object.rb
gooddata-0.6.17 lib/gooddata/rest/object.rb
gooddata-0.6.16 lib/gooddata/rest/object.rb
gooddata-0.6.15 lib/gooddata/rest/object.rb
gooddata-0.6.14 lib/gooddata/rest/object.rb
gooddata-0.6.13 lib/gooddata/rest/object.rb
gooddata-0.6.12 lib/gooddata/rest/object.rb
gooddata-0.6.11 lib/gooddata/rest/object.rb