Sha256: 61b340dfcf8f6fae7f92b1a00fa65040bb861142cb84e27ab059577508858700

Contents?: true

Size: 893 Bytes

Versions: 13

Compression:

Stored size: 893 Bytes

Contents

# encoding: UTF-8
#
# Copyright (c) 2010-2017 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

13 entries across 13 versions & 1 rubygems

Version Path
gooddata-1.1.0-java lib/gooddata/bricks/brick.rb
gooddata-1.1.0 lib/gooddata/bricks/brick.rb
gooddata-1.0.2-java lib/gooddata/bricks/brick.rb
gooddata-1.0.2 lib/gooddata/bricks/brick.rb
gooddata-1.0.1 lib/gooddata/bricks/brick.rb
gooddata-1.0.1-java lib/gooddata/bricks/brick.rb
gooddata-1.0.0-java lib/gooddata/bricks/brick.rb
gooddata-1.0.0 lib/gooddata/bricks/brick.rb
gooddata-0.6.54 lib/gooddata/bricks/brick.rb
gooddata-0.6.53 lib/gooddata/bricks/brick.rb
gooddata-0.6.52 lib/gooddata/bricks/brick.rb
gooddata-0.6.51 lib/gooddata/bricks/brick.rb
gooddata-0.6.50 lib/gooddata/bricks/brick.rb