lib/quantify/unit/prefix/base_prefix.rb in quantify-1.0.5 vs lib/quantify/unit/prefix/base_prefix.rb in quantify-1.1.0

- old
+ new

@@ -8,27 +8,27 @@ if options.is_a? Hash Prefix.prefixes << self.new(options) end end - def self.configure &block - self.class_eval &block if block + def self.configure(&block) + self.class_eval(&block) if block end attr_reader :name, :symbol, :factor def initialize(options) - @symbol = options[:symbol].standardize + @symbol = options[:symbol].remove_underscores @factor = options[:factor].to_f - @name = options[:name].standardize.downcase + @name = options[:name].remove_underscores.downcase end def is_si_prefix? self.is_a? SI end def is_non_si_prefix? - self.is_a? NonSI + self.is_a?(NonSI) end def label symbol end