Sha256: ca5d3d4cd77db053fcfe38cb6f7d8edaa16228a98774f76c7e0af23afc79d570
Contents?: true
Size: 396 Bytes
Versions: 16
Compression:
Stored size: 396 Bytes
Contents
module NumericCheckExt def is_numeric? arg arg.is_a? Numeric end alias_method :numeric?, :is_numeric? def check_numeric! arg raise ArgumentError, "Argument must be Numeric" if !is_numeric? arg end end module NumberDslExt def thousand self * 1000 end def hundred self * 100 end end [Float, Numeric].each do |mod| mod.send :include, NumberDslExt end
Version data entries
16 entries across 16 versions & 1 rubygems