Sha256: 40b5608f776c7092912c3553775c73d9360d6383be5ef0b06f5440c9d545abfe

Contents?: true

Size: 148 Bytes

Versions: 1

Compression:

Stored size: 148 Bytes

Contents

require 'ruby-measurement/unit'

class Symbol
  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/symbol.rb