Sha256: fb39d7c603f9dc79937db29e3e69d37931daabdda184dc6893b16fc67ef74aec

Contents?: true

Size: 677 Bytes

Versions: 5

Compression:

Stored size: 677 Bytes

Contents

module Pronto
  module Formatter
    def self.get(names)
      names ||= 'text'
      Array(names).map { |name| FORMATTERS[name.to_s] || TextFormatter }
        .uniq.map(&:new)
    end

    def self.names
      FORMATTERS.keys
    end

    FORMATTERS = {
      'github' => GithubFormatter,
      'github_status' => GithubStatusFormatter,
      'github_pr' => GithubPullRequestFormatter,
      'gitlab' => GitlabFormatter,
      'bitbucket' => BitbucketFormatter,
      'bitbucket_pr' => BitbucketPullRequestFormatter,
      'json' => JsonFormatter,
      'checkstyle' => CheckstyleFormatter,
      'text' => TextFormatter,
      'null' => NullFormatter
    }.freeze
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pronto-0.8.2 lib/pronto/formatter/formatter.rb
pronto-0.8.1 lib/pronto/formatter/formatter.rb
pronto-0.8.0 lib/pronto/formatter/formatter.rb
pronto-0.7.1 lib/pronto/formatter/formatter.rb
pronto-0.7.0 lib/pronto/formatter/formatter.rb