Sha256: c338369499996965fbaa14a2a656fa6b08ef6c4c3ae2f560681c8e585f510bee

Contents?: true

Size: 223 Bytes

Versions: 4

Compression:

Stored size: 223 Bytes

Contents

class Numeric
  # make a unitless unit with a given scalar
  # @return (see Unit#initialize)
  def to_unit(other = nil)
    other ? Unit.new(self, other) : Unit.new(self)
  end
  alias :unit :to_unit
  alias :u :to_unit
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-units-1.4.3 lib/ruby_units/numeric.rb
ruby-units-1.4.2 lib/ruby_units/numeric.rb
ruby-units-1.4.1 lib/ruby_units/numeric.rb
ruby-units-1.4.0 lib/ruby_units/numeric.rb