Sha256: c746e25fe723024876bda4e694f94ac0a5eb106901ffba8b46e882fc79385292

Contents?: true

Size: 220 Bytes

Versions: 6

Compression:

Stored size: 220 Bytes

Contents

class Object
  
  # Shortcut for creating Unit object
  # @example 
  #   Unit("1 mm")
  #   U("1 mm")
  # @return [Unit]
  def Unit(*other)
    other.to_unit
  end
  alias :U :Unit

  # @deprecated
  alias :u :Unit
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-units-1.4.5 lib/ruby_units/object.rb
ruby-units-1.4.4 lib/ruby_units/object.rb
ruby-units-1.4.3 lib/ruby_units/object.rb
ruby-units-1.4.2 lib/ruby_units/object.rb
ruby-units-1.4.1 lib/ruby_units/object.rb
ruby-units-1.4.0 lib/ruby_units/object.rb