Class: BB::Evaluator::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/b_b/evaluator/table.rb

Constant Summary collapse

EVALUATE_TYPES =
%i(subquery table_date table_date_range plain).freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, options = {}) ⇒ Table

Returns a new instance of Table.



8
9
10
11
# File 'lib/b_b/evaluator/table.rb', line 8

def initialize(value, options = {})
  @value   = value
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/b_b/evaluator/table.rb', line 6

def options
  @options
end

#valueObject (readonly)

Returns the value of attribute value.



6
7
8
# File 'lib/b_b/evaluator/table.rb', line 6

def value
  @value
end

Class Method Details

.eval_type(value, options = {}) ⇒ Object



36
37
38
# File 'lib/b_b/evaluator/table.rb', line 36

def eval_type(value, options = {})
  new(value, options).eval_type
end

Instance Method Details

#eval_typeObject



13
14
15
# File 'lib/b_b/evaluator/table.rb', line 13

def eval_type
  EVALUATE_TYPES.detect { |type| send("#{type}?") }
end