class Formats::Base

Attributes

data[R]

Public Class Methods

new(data) click to toggle source
# File lib/parser/formats/base.rb, line 7
def initialize(data)
  @data = data
end

Private Instance Methods

output_data() click to toggle source
# File lib/parser/formats/base.rb, line 17
def output_data
  sorted_data.each do |path, ips|
    puts "#{path} #{ips.size} #{description}"
  end
end
sorted_data() click to toggle source
# File lib/parser/formats/base.rb, line 13
def sorted_data
  data.sort_by { |_, ips| -ips.size }
end