lib/packwerk/parsers/factory.rb in packwerk-1.0.2 vs lib/packwerk/parsers/factory.rb in packwerk-1.1.0

- old
+ new

@@ -24,11 +24,20 @@ def for_path(path) case path when RUBY_REGEX @ruby_parser ||= Ruby.new when ERB_REGEX - @erb_parser ||= Erb.new + @erb_parser ||= erb_parser_class.new end + end + + def erb_parser_class + @erb_parser_class || Erb + end + + def erb_parser_class=(klass) + @erb_parser_class = klass + @erb_parser = nil end end end end