Sha256: 4ac886e15f6a330e9b731bf7530a3340cf9e816e789f39b3ace6a3dde6585bb6

Contents?: true

Size: 323 Bytes

Versions: 13

Compression:

Stored size: 323 Bytes

Contents

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

    def self.names
      FORMATTERS.keys
    end

    FORMATTERS = {
      'github' => GithubFormatter,
      'json' => JsonFormatter,
      'text' => TextFormatter
    }
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
pronto-0.2.4 lib/pronto/formatter/formatter.rb
pronto-0.2.3 lib/pronto/formatter/formatter.rb
pronto-0.2.2 lib/pronto/formatter/formatter.rb
pronto-0.2.1 lib/pronto/formatter/formatter.rb
pronto-0.2.0 lib/pronto/formatter/formatter.rb
pronto-0.1.7 lib/pronto/formatter/formatter.rb
pronto-0.1.6 lib/pronto/formatter/formatter.rb
pronto-0.1.5 lib/pronto/formatter/formatter.rb
pronto-0.1.4 lib/pronto/formatter/formatter.rb
pronto-0.1.3 lib/pronto/formatter/formatter.rb
pronto-0.1.2 lib/pronto/formatter/formatter.rb
pronto-0.1.1 lib/pronto/formatter/formatter.rb
pronto-0.1.0 lib/pronto/formatter/formatter.rb