Class: DontRepeatYourself::FormatterFactory
- Inherits:
-
Object
- Object
- DontRepeatYourself::FormatterFactory
- Defined in:
- lib/dont_repeat_yourself/formatter.rb
Constant Summary collapse
- @@snippet_extractor =
TODO Use a kind of Dependency Injection here, the plugin should not know about this class
DontRepeatYourself::SnippetExtractor.new
Class Method Summary collapse
Class Method Details
.create_report(report_type, simian_results) ⇒ Object
11 12 13 14 |
# File 'lib/dont_repeat_yourself/formatter.rb', line 11 def self.create_report(report_type, simian_results) formatter_class = DontRepeatYourself.const_get("#{report_type}Formatter") return formatter_class.new(@@snippet_extractor, simian_results).report end |