Class: Pal::Operation::Projection
- Inherits:
-
Object
- Object
- Pal::Operation::Projection
- Includes:
- Log
- Defined in:
- lib/pal/operation/projection.rb
Direct Known Subclasses
AverageProjectionImpl, CountProjectionImpl, DefaultProjectionImpl, DistinctProjectionImpl, MaxMinProjectionImpl, SumProjectionImpl
Instance Attribute Summary collapse
- #property ⇒ String readonly
- #type ⇒ String readonly
Instance Method Summary collapse
-
#initialize(type, property) ⇒ Projection
constructor
A new instance of Projection.
-
#process(group_by_rules, groups, column_headers) ⇒ Array
Rows, column_headers.
- #processable? ⇒ Boolean
Methods included from Log
#log_debug, #log_error, #log_info, #log_warn
Constructor Details
#initialize(type, property) ⇒ Projection
Returns a new instance of Projection.
18 19 20 21 |
# File 'lib/pal/operation/projection.rb', line 18 def initialize(type, property) @type = type @property = property end |
Instance Attribute Details
#property ⇒ String (readonly)
14 15 16 |
# File 'lib/pal/operation/projection.rb', line 14 def property @property end |
#type ⇒ String (readonly)
11 12 13 |
# File 'lib/pal/operation/projection.rb', line 11 def type @type end |
Instance Method Details
#process(group_by_rules, groups, column_headers) ⇒ Array
Returns rows, column_headers.
27 28 29 30 |
# File 'lib/pal/operation/projection.rb', line 27 def process(group_by_rules, groups, column_headers) log_info("Calling down to projection impl [#{type}]") _process_impl(group_by_rules, groups, column_headers) end |
#processable? ⇒ Boolean
33 34 35 |
# File 'lib/pal/operation/projection.rb', line 33 def processable? !(@type.nil? || @property.nil?) end |