Class: Goldmine::RollupCleanRoom
- Inherits:
-
Object
- Object
- Goldmine::RollupCleanRoom
- Defined in:
- lib/goldmine/rollup_clean_room.rb
Instance Attribute Summary collapse
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #eigen ⇒ Object
-
#initialize(name, cache = {}) ⇒ RollupCleanRoom
constructor
A new instance of RollupCleanRoom.
- #rollup(pivoted_list, &block) ⇒ Object
Constructor Details
#initialize(name, cache = {}) ⇒ RollupCleanRoom
Returns a new instance of RollupCleanRoom.
5 6 7 8 |
# File 'lib/goldmine/rollup_clean_room.rb', line 5 def initialize(name, cache={}) @name = name @cache = cache end |
Instance Attribute Details
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
3 4 5 |
# File 'lib/goldmine/rollup_clean_room.rb', line 3 def cache @cache end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/goldmine/rollup_clean_room.rb', line 3 def name @name end |
Instance Method Details
#eigen ⇒ Object
10 11 12 13 14 |
# File 'lib/goldmine/rollup_clean_room.rb', line 10 def eigen class << self self end end |
#rollup(pivoted_list, &block) ⇒ Object
16 17 18 19 |
# File 'lib/goldmine/rollup_clean_room.rb', line 16 def rollup(pivoted_list, &block) eigen.instance_eval { define_method(:do_rollup, &block) } @cache[name] = do_rollup(pivoted_list) end |