Sha256: 3573a020a5eef07fdb97ce01dcd8e0cb1ee907d52f63b134a6a557f9bd191943

Contents?: true

Size: 858 Bytes

Versions: 2

Compression:

Stored size: 858 Bytes

Contents

require 'gooddata/bricks/utils'
require 'gooddata/bricks/middleware/middleware'
require 'gooddata/bricks/middleware/bench_middleware'
require 'gooddata/bricks/middleware/gooddata_middleware'
require 'gooddata/bricks/middleware/logger_middleware'
require 'gooddata/bricks/middleware/stdout_middleware'

module GoodData
  module Bricks

    class Pipeline
      def self.prepare(pipeline)
        pipeline.reverse.reduce(nil) {|memo, app| memo.nil? ? app.new : app.new(memo)}
      end
    end
    
    class Brick

      def log(message)
        logger = @params[:gdc_logger]
        logger.info(message) unless logger.nil?
      end

      def name
        self.class
      end

      def version
        fail "Method version should be reimplemented"
      end

      def call(params={})
        @params = params
        ""
      end

    end
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gooddata-0.6.0.pre4 lib/gooddata/bricks/brick.rb
gooddata-0.6.0.pre3 lib/gooddata/bricks/brick.rb