Module: Pronto::Formatter
- Defined in:
- lib/pronto/formatter/formatter.rb,
lib/pronto/formatter/json_formatter.rb,
lib/pronto/formatter/text_formatter.rb,
lib/pronto/formatter/github_formatter.rb
Defined Under Namespace
Classes: GithubFormatter, JsonFormatter, TextFormatter
Constant Summary
collapse
- FORMATTERS =
{
'github' => GithubFormatter,
'json' => JsonFormatter,
'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
|
.names ⇒ Object
8
9
10
|
# File 'lib/pronto/formatter/formatter.rb', line 8
def self.names
FORMATTERS.keys
end
|