lib/fontist/formulas.rb in fontist-0.4.0 vs lib/fontist/formulas.rb in fontist-1.0.0
- old
+ new
@@ -1,10 +1,15 @@
-require "fontist/formulas/base"
-require "fontist/formulas/ms_vista"
-require "fontist/formulas/ms_system"
-require "fontist/formulas/source_font"
-require "fontist/formulas/courier_font"
+require "fontist/utils"
+require "fontist/font_formula"
module Fontist
module Formulas
+ def self.register_formulas
+ Formulas.constants.select do |constant|
+ if Formulas.const_get(constant).is_a?(Class)
+ klass = "Fontist::Formulas::#{constant}"
+ Fontist::Registry.register(Object.const_get(klass))
+ end
+ end
+ end
end
end