Sha256: 879e09b101f5a6ce4fae5119380b5d37eefe9d5aeeb42dee2a6cd8b3b4e2099d

Contents?: true

Size: 893 Bytes

Versions: 8

Compression:

Stored size: 893 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.

require_relative 'utils'
require_relative 'middleware/middleware'
require_relative 'pipeline'

module GoodData
  module Bricks
    # Brick base class
    class Brick
      def log(message)
        logger = @params[:gdc_logger]
        logger.info(message) unless logger.nil?
      end

      # Name of the brick
      def name
        self.class
      end

      # Version of brick, this should be implemented in subclasses
      def version
        raise NotImplementedError, 'Method version should be reimplemented'
      end

      # Bricks implementation which can be 'called'
      def call(params = {})
        @params = params
        ''
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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