Sha256: 221ea72f3b90bba25e75a59561b83ff3f92818564f94ac2eb332695b508323f0

Contents?: true

Size: 865 Bytes

Versions: 60

Compression:

Stored size: 865 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'

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

60 entries across 60 versions & 1 rubygems

Version Path
gooddata-2.0.0-java lib/gooddata/bricks/brick.rb
gooddata-2.0.0 lib/gooddata/bricks/brick.rb
gooddata-1.3.6-java lib/gooddata/bricks/brick.rb
gooddata-1.3.6 lib/gooddata/bricks/brick.rb
gooddata-1.3.5-java lib/gooddata/bricks/brick.rb
gooddata-1.3.5 lib/gooddata/bricks/brick.rb
gooddata-1.3.4-java lib/gooddata/bricks/brick.rb
gooddata-1.3.4 lib/gooddata/bricks/brick.rb
gooddata-1.3.3-java lib/gooddata/bricks/brick.rb
gooddata-1.3.3 lib/gooddata/bricks/brick.rb
gooddata-1.3.2-java lib/gooddata/bricks/brick.rb
gooddata-1.3.2 lib/gooddata/bricks/brick.rb
gooddata-1.3.1-java lib/gooddata/bricks/brick.rb
gooddata-1.3.1 lib/gooddata/bricks/brick.rb
gooddata-1.3.0-java lib/gooddata/bricks/brick.rb
gooddata-1.3.0 lib/gooddata/bricks/brick.rb
gooddata-1.2.1-java lib/gooddata/bricks/brick.rb
gooddata-1.2.1 lib/gooddata/bricks/brick.rb
gooddata-1.2.0-java lib/gooddata/bricks/brick.rb
gooddata-1.2.0 lib/gooddata/bricks/brick.rb