Sha256: bf05da974404fc0bf312767504fb806d6f4a1c1e6830906e7b8caba08e221a8e
Contents?: true
Size: 990 Bytes
Versions: 2
Compression:
Stored size: 990 Bytes
Contents
# frozen_string_literal: true require 'table_beet/world' require 'table_beet/formatters/text_formatter' require 'table_beet/formatters/oneline_formatter' require 'table_beet/formatters/html_formatter' module TableBeet class Reporter # # @param [Hash] config # :format => [Symbol] Output format # :t or :text is plain text # otherwise HTML # # :output => [String] Directory to output' # def self.build(config = {}) type = config[:format] output = config[:output] || './stepdoc' formatter(type).new(TableBeet::World.scopes, output).flush end def self.formatter(type) case type when :t, :text TableBeet::Formatters::TextFormatter when :s, :oneline TableBeet::Formatters::OnelineFormatter else TableBeet::Formatters::HTMLFormatter end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
table_beet2-0.0.5 | lib/table_beet/reporter.rb |
table_beet2-0.0.4 | lib/table_beet/reporter.rb |