Class: GitTrend::Formatters::JsonFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/git_trend/formatters/json_formatter.rb

Instance Method Summary collapse

Instance Method Details



5
6
7
# File 'lib/git_trend/formatters/json_formatter.rb', line 5

def print(projects, options)
  puts projects.map { |project| project.to_h }.to_json
end


9
10
11
# File 'lib/git_trend/formatters/json_formatter.rb', line 9

def print_languages(languages)
  puts languages.to_json
end