lib/picky/internals/query/qualifiers.rb in picky-2.1.2 vs lib/picky/internals/query/qualifiers.rb in picky-2.2.0
- old
+ new
@@ -33,29 +33,30 @@
# Collection class for qualifiers.
#
class Qualifiers # :nodoc:all
- include Singleton
-
attr_reader :qualifiers, :normalization_mapping
delegate :<<, :to => :qualifiers
#
#
def initialize
@qualifiers = []
@normalization_mapping = {}
end
-
+ def self.instance
+ @instanec ||= new
+ end
+
# TODO Spec.
#
def self.add name, qualifiers
instance << Qualifier.new(name, qualifiers)
end
-
+
# Uses the qualifiers to prepare (optimize) the qualifier handling.
#
def prepare
qualifiers.each do |qualifier|
qualifier.inject_into normalization_mapping
@@ -73,9 +74,9 @@
normalization_mapping[qualifier.to_sym]
end
end
-
+
end
-
+
end
\ No newline at end of file