Sha256: 907677e35f197888ccac3f764bf40e4201c3bc21fcd6fdfcdd69979d2fe0413a

Contents?: true

Size: 249 Bytes

Versions: 13

Compression:

Stored size: 249 Bytes

Contents

require "json"

module GitTrend::Formatters
  class JsonFormatter
    def print(projects, options)
      puts projects.map { |project| project.to_h }.to_json
    end

    def print_languages(languages)
      puts languages.to_json
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
git-trend-1.3.0 lib/git_trend/formatters/json_formatter.rb
git-trend-1.2.9 lib/git_trend/formatters/json_formatter.rb
git-trend-1.2.8 lib/git_trend/formatters/json_formatter.rb
git-trend-1.2.7 lib/git_trend/formatters/json_formatter.rb
git-trend-1.2.6 lib/git_trend/formatters/json_formatter.rb
git-trend-1.2.5 lib/git_trend/formatters/json_formatter.rb
git-trend-1.2.4 lib/git_trend/formatters/json_formatter.rb
git-trend-1.2.3 lib/git_trend/formatters/json_formatter.rb
git-trend-1.2.2 lib/git_trend/formatters/json_formatter.rb
git-trend-1.2.1 lib/git_trend/formatters/json_formatter.rb
git-trend-1.2.0 lib/git_trend/formatters/json_formatter.rb
git-trend-1.1.9 lib/git_trend/formatters/json_formatter.rb
git-trend-1.1.8 lib/git_trend/formatters/json_formatter.rb