Sha256: 0d0efe3f4d2230ee92830c03b3860baa338ca9c1602d59997c37763689bece86
Contents?: true
Size: 211 Bytes
Versions: 1
Compression:
Stored size: 211 Bytes
Contents
require 'ruby-measurement/measurement' class String def to_measurement Measurement.parse(self) end def to_unit Measurement::Unit[self] or raise ArgumentError, "Invalid unit: '#{self}'" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-measurement-1.3.0 | lib/ruby-measurement/core_ext/string.rb |