Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-measurement/core_ext/symbol.rb

Instance Method Summary collapse

Instance Method Details

#to_unitObject



4
5
6
# File 'lib/ruby-measurement/core_ext/symbol.rb', line 4

def to_unit
  Measurement::Unit[self] or raise ArgumentError, "Invalid unit: '#{self}'"
end