Class: TableBeet::Reporter
- Inherits:
-
Object
- Object
- TableBeet::Reporter
- Defined in:
- lib/table_beet/reporter.rb
Class Method Summary collapse
Class Method Details
.build(config = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/table_beet/reporter.rb', line 16 def self.build(config = {}) type = config[:format] output = config[:output] || './stepdoc' formatter(type).new(TableBeet::World.scopes, output).flush end |
.formatter(type) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/table_beet/reporter.rb', line 22 def self.formatter(type) case type when :t, :text TableBeet::Formatters::TextFormatter when :s, :oneline TableBeet::Formatters::OnelineFormatter else TableBeet::Formatters::HTMLFormatter end end |