Add unit: bag
This commit is contained in:
parent
80cb806122
commit
8777830029
1 changed files with 7 additions and 0 deletions
|
@ -20,6 +20,13 @@ if defined? RubyUnits
|
||||||
unit.kind = :counting
|
unit.kind = :counting
|
||||||
end
|
end
|
||||||
|
|
||||||
|
RubyUnits::Unit.define('bag') do |unit|
|
||||||
|
unit.definition = RubyUnits::Unit.new('1 each')
|
||||||
|
unit.aliases = %w{bag bags blt sachet sachets} # locale: en
|
||||||
|
unit.aliases += %w{zak zakken zakje zakjes} # locale: nl
|
||||||
|
unit.kind = :counting
|
||||||
|
end
|
||||||
|
|
||||||
# we use pc for piece, not parsec
|
# we use pc for piece, not parsec
|
||||||
RubyUnits::Unit.redefine!('parsec') do |unit|
|
RubyUnits::Unit.redefine!('parsec') do |unit|
|
||||||
unit.aliases = unit.aliases.reject {|u| u=='pc'}
|
unit.aliases = unit.aliases.reject {|u| u=='pc'}
|
||||||
|
|
Loading…
Reference in a new issue