Sha256: 79d3aad2548aa94e0e1085363c84ba0c7fa4a19011c57c23a28638a70f292ef8

Contents?: true

Size: 972 Bytes

Versions: 2

Compression:

Stored size: 972 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'
require 'gooddata/bricks/middleware/restforce_middleware'
require 'gooddata/bricks/middleware/twitter_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.pre6 lib/gooddata/bricks/brick.rb
gooddata-0.6.0.pre5 lib/gooddata/bricks/brick.rb