lib/qipowl/core/ruler.rb in qipowl-0.9.2 vs lib/qipowl/core/ruler.rb in qipowl-0.9.3

- old
+ new

@@ -18,12 +18,10 @@ module Ruler include TypoLogging extend self @@bowlers = {} # FIXME REDIS!!!! - @@yamls = {} - def get_bowler id: nil, type: nil @@bowlers[id] || new_bowler(type, true) end @@ -48,16 +46,14 @@ persistent ? [@@bowlers[id] = clazz.new, id] : clazz.new end private def get_yaml yaml - return @@yamls[yaml] if @@yamls[yaml] - clazz = Qipowl::Mappers.const_get("#{yaml.capitalize}BowlerMapper") raise NameError.new("Invalid mapper type: #{clazz}") \ unless clazz.is_a?(Class) && clazz < Qipowl::Mappers::BowlerMapper - @@yamls[yaml] = clazz.new + clazz.new end # FIXME Make contants PER-EIGENCLASS def teach_class clazz, mapper clazz.const_set("CUSTOM_TAGS", mapper.to_hash[:custom])