Sha256: b56f99f5d31b85a0da3b57919c13efec0e2df4f6368e5b47451bb9723132d92c

Contents?: true

Size: 644 Bytes

Versions: 8

Compression:

Stored size: 644 Bytes

Contents

# encoding: UTF-8
#
# Copyright (c) 2010-2015 GoodData Corporation. All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

module GoodData
  module Bricks
    class Pipeline
      # Pipeline preparation code
      def self.prepare(pipeline)
        pipeline.reverse.reduce(nil) do |memo, app|
          if memo.nil?
            app.respond_to?(:new) ? app.new : app
          elsif app.respond_to?(:new)
            app.new(app: memo)
          else
            app.app = memo
            app
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gooddata-bricks-0.8.0 lib/gooddata/bricks/pipeline.rb
gooddata-bricks-0.7.0 lib/gooddata/bricks/pipeline.rb
gooddata-bricks-0.6.0 lib/gooddata/bricks/pipeline.rb
gooddata-bricks-0.5.0 lib/gooddata/bricks/pipeline.rb
gooddata-bricks-0.4.0 lib/gooddata/bricks/pipeline.rb
gooddata-bricks-0.3.0 lib/gooddata/bricks/pipeline.rb
gooddata-bricks-0.2.0 lib/gooddata/bricks/pipeline.rb
gooddata-bricks-0.1.0 lib/gooddata/bricks/pipeline.rb