class Axiom::Aggregate::Count

The count of a series of values

Constants

DEFAULT

Public Class Methods

call(count, value) click to toggle source

Return the count for a series of values

@example

count = Count.call(count, value)

@param [Integer] count

@param [Object] value

@return [Integer]

@api public

# File lib/axiom/aggregate/count.rb, line 23
def self.call(count, value)
  value.nil? ? count : count.succ
end
type() click to toggle source

Return the type returned from call

@example

type = Axiom::Aggregate::Count.type  # => Axiom::Types::Integer

@return [Class<Types::Integer>]

@api public

# File lib/axiom/aggregate/count.rb, line 35
def self.type
  Types::Integer
end