Sha256: e239157b530cca2c0ae12656e8325beb49c7dde2c06268262ff5b0739cd990f2
Contents?: true
Size: 1.27 KB
Versions: 2
Compression:
Stored size: 1.27 KB
Contents
# encoding: utf-8 module Axiom class Aggregate # The maximum value in a sequence of numbers class Minimum < Aggregate DEFAULT = Float::INFINITY # Return the minimum value for a sequence of numbers # # @example # minimum = Minimum.call(minimum, value) # # @param [Numeric] minimum # # @param [Numeric] value # # @return [Numeric] # # @api public def self.call(minimum, value) return minimum if value.nil? value < minimum ? value : minimum end # Return the type returned from #call # # @example # type = aggregate.type # => Axiom::Types::Numeric # # @return [Class<Types::Numeric>] # # @api public def type Attribute.infer_type(operand) end module Methods extend Aliasable inheritable_alias(min: :minimum) # Return a minimum aggregate function # # @example # minimum = attribute.minimum # # @param [Attribute] # # @return [Minimum] # # @api public def minimum Minimum.new(self) end end # module Methods end # class Minimum 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/minimum.rb |
axiom-0.1.1 | lib/axiom/aggregate/minimum.rb |