Module: Pronto::Formatter

Defined in:
lib/pronto/formatter/formatter.rb,
lib/pronto/formatter/text_formatter.rb,
lib/pronto/formatter/json_formatter.rb,
lib/pronto/formatter/github_formatter.rb,
lib/pronto/formatter/gitlab_formatter.rb,
lib/pronto/formatter/checkstyle_formatter.rb,
lib/pronto/formatter/github_pull_request_formatter.rb

Defined Under Namespace

Classes: CheckstyleFormatter, GithubFormatter, GithubPullRequestFormatter, GitlabFormatter, JsonFormatter, TextFormatter

Constant Summary collapse

FORMATTERS =
{
  'github' => GithubFormatter,
  'github_pr' => GithubPullRequestFormatter,
  'gitlab' => GitlabFormatter,
  'json' => JsonFormatter,
  'checkstyle' => CheckstyleFormatter,
  'text' => TextFormatter
}

Class Method Summary collapse

Class Method Details

.get(name) ⇒ Object


3
4
5
6
# File 'lib/pronto/formatter/formatter.rb', line 3

def self.get(name)
  formatter = FORMATTERS[name.to_s] || TextFormatter
  formatter.new
end

.namesObject


8
9
10
# File 'lib/pronto/formatter/formatter.rb', line 8

def self.names
  FORMATTERS.keys
end