class UrlParser

Public Class Methods

new(url) click to toggle source
# File lib/parser/url_parser.rb, line 5
def initialize(url)
  @url = url
end

Public Instance Methods

parse() click to toggle source
# File lib/parser/url_parser.rb, line 9
def parse
  JSON.parse(content[16..-1])['payload']
end

Private Instance Methods

content() click to toggle source
# File lib/parser/url_parser.rb, line 15
def content
  content = ''
  open(@url) do |file|
    file.each_line { |line| content << line }
  end
  content
end