Sha256: aa4fcca31eef15bcb9d3b1fa53d1b08bee57bc19b744742426c25dadd07a771d
Contents?: true
Size: 1.11 KB
Versions: 2
Compression:
Stored size: 1.11 KB
Contents
# encoding: utf-8 module Axiom class Aggregate # The count of a series of values class Count < Aggregate DEFAULT = 0 # Return the count for a series of values # # @example # count = Count.call(count, value) # # @param [Integer] count # # @param [Object] value # # @return [Integer] # # @api public def self.call(count, value) value.nil? ? count : count.succ end # Return the type returned from #call # # @example # type = Axiom::Aggregate::Count.type # => Axiom::Types::Integer # # @return [Class<Types::Integer>] # # @api public def self.type Types::Integer end module Methods # Return a count aggregate function # # @example # count = attribute.count # # @param [Attribute] # # @return [Count] # # @api public def count Count.new(self) end end # module Methods end # class Count end # class Aggregate end # module Axiom
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.2.0 | lib/axiom/aggregate/count.rb |
axiom-0.1.1 | lib/axiom/aggregate/count.rb |