Sha256: 097950a9431f1245a4144af7b68dc720036feaf0d2752be46382da16277e509a
Contents?: true
Size: 253 Bytes
Versions: 2
Compression:
Stored size: 253 Bytes
Contents
class Numeric def convert(unit) Unitwise::Measurement.new(self, unit) end def method_missing(meth, *args, &block) if Unitwise::Expression.decompose(meth) self.convert(meth) else super(meth, *args, &block) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
unitwise-0.2.0 | lib/unitwise/ext/numeric.rb |
unitwise-0.1.0 | lib/unitwise/ext/numeric.rb |