Module: Compute::ClassMethods
- Defined in:
- lib/compute.rb
Instance Method Summary collapse
Instance Method Details
#computations ⇒ Object
15 16 17 |
# File 'lib/compute.rb', line 15 def computations @computations ||= ComputationGraph.new end |
#compute(property, &block) ⇒ Object
11 12 13 |
# File 'lib/compute.rb', line 11 def compute(property, &block) computations << Computation.new(self, property, &block) end |
#recompute!(*properties) ⇒ Object
19 20 21 |
# File 'lib/compute.rb', line 19 def recompute!(*properties) scoped.each { |record| record.recompute!(*properties) } end |