Class: GoodData::Bricks::Brick

Inherits:
Object
  • Object
show all
Defined in:
lib/gooddata/bricks/brick.rb

Overview

Brick base class

Instance Method Summary collapse

Instance Method Details

#call(params = {}) ⇒ Object

Bricks implementation which can be 'called'



32
33
34
35
# File 'lib/gooddata/bricks/brick.rb', line 32

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

#log(message) ⇒ Object



16
17
18
19
# File 'lib/gooddata/bricks/brick.rb', line 16

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

#nameObject

Name of the brick



22
23
24
# File 'lib/gooddata/bricks/brick.rb', line 22

def name
  self.class
end

#versionObject

Version of brick, this should be implemented in subclasses



27
28
29
# File 'lib/gooddata/bricks/brick.rb', line 27

def version
  fail NotImplementedError, 'Method version should be reimplemented'
end