class GitTrend::Formatter

Public Class Methods

new(key) click to toggle source
# File lib/git_trend/formatter.rb, line 3
def initialize(key)
  @formatter = formatter_class(key).new
end

Public Instance Methods

print(projects, options = nil) click to toggle source
print_languages(languages) click to toggle source

Private Instance Methods

formatter_class(key) click to toggle source
# File lib/git_trend/formatter.rb, line 16
def formatter_class(key)
  case key
  when "j", "json" then Formatters::JsonFormatter
  else Formatters::TextFormatter
  end
end