Class: Reporter::Field::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/reporter/field/base.rb

Direct Known Subclasses

CalculationField, Field, FormulaField

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(structure, alias_name) ⇒ Base

Returns a new instance of Base.



3
4
5
6
# File 'lib/reporter/field/base.rb', line 3

def initialize structure, alias_name
	@structure = structure
	@name = alias_name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



16
17
18
# File 'lib/reporter/field/base.rb', line 16

def name
  @name
end

Instance Method Details

#calculate_value(data_source, options) ⇒ Object

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/reporter/field/base.rb', line 12

def calculate_value data_source, options
	raise NotImplementedError
end

#validateObject

Raises:

  • (NotImplementedError)


8
9
10
# File 'lib/reporter/field/base.rb', line 8

def validate
	raise NotImplementedError
end