Sha256: 1ae99e69721d44cbe5e194df08588b691ade1e70252b5c6dda8f869225ceee12

Contents?: true

Size: 214 Bytes

Versions: 9

Compression:

Stored size: 214 Bytes

Contents

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ruby-units-2.4.1 lib/ruby_units/numeric.rb
ruby-units-2.3.2 lib/ruby_units/numeric.rb
ruby-units-2.3.1 lib/ruby_units/numeric.rb
ruby-units-2.3.0 lib/ruby_units/numeric.rb
ruby-units-2.2.1 lib/ruby_units/numeric.rb
ruby-units-2.2.0 lib/ruby_units/numeric.rb
ruby-units-2.1.0 lib/ruby_units/numeric.rb
ruby-units-2.0.1 lib/ruby_units/numeric.rb
ruby-units-2.0.0 lib/ruby_units/numeric.rb