lib/rhoconnect/document.rb in rhoconnect-4.0.0.beta.12 vs lib/rhoconnect/document.rb in rhoconnect-4.0.0.beta.24

- old
+ new

@@ -5,18 +5,26 @@ end end module ClassMethods def define_valid_doctypes(doctypes = []) - @valid_doctypes ||= Set.new + @valid_doctypes ||= {} doctypes.each do |doctype| - @valid_doctypes.add(doctype.to_sym) + @valid_doctypes[doctype.to_sym] = :document end @enforce_valid_doctypes ||= true end + def define_valid_queues(queues = []) + @valid_doctypes ||= {} + queues.each do |doctype| + @valid_doctypes[doctype.to_sym] = :queue + end + @enforce_valid_doctypes ||= true + end + def valid_doctypes - @valid_doctypes ||= Set.new + @valid_doctypes ||= {} @valid_doctypes end def enforce_valid_doctypes @enforce_valid_doctypes ||= false