Sha256: 1c9b8b7de58d7a70c345b5046d923e1579dcea5d6943bb025711780a3ddd803b

Contents?: true

Size: 325 Bytes

Versions: 1

Compression:

Stored size: 325 Bytes

Contents

# frozen_string_literal: true

# class DataParser
class DataParser
  def initialize(file_name)
    @data = File.readlines(file_name)
  end

  def parse_data
    result = []
    @data.each do |page|
      temp = page.split(" ")
      result << {
        page: temp[0],
        ip: temp[1]
      }
    end
    result
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
web_server_report-0.1.0 lib/web_server_report/data_parser.rb