Sha256: 32b6614d9fdf3ab79558dd965dbe8eeaa87097c1b173373e5a228446871bd2fd
Contents?: true
Size: 499 Bytes
Versions: 4
Compression:
Stored size: 499 Bytes
Contents
module Streamer module Functors # Average gives the average of a list given a property. class Average < Functor def call Divide.new( payload, terms: [total, count] ).call end def total Sum.new( payload, list: options.fetch(:list), property: options.fetch(:property) ).call end def count Count.new(payload, list: options.fetch(:list)).call end end end end
Version data entries
4 entries across 4 versions & 1 rubygems