Class: FYT::Parser

Inherits:
Base
  • Object
show all
Defined in:
lib/fyt/parser.rb

Overview

reads and prepares a youtube feed for further processing

Instance Method Summary collapse

Methods inherited from Base

#logger

Constructor Details

#initialize(url, proxy) ⇒ Parser



8
9
10
11
# File 'lib/fyt/parser.rb', line 8

def initialize(url, proxy)
  @url = url
  @proxy = proxy
end

Instance Method Details

#readObject



13
14
15
16
17
# File 'lib/fyt/parser.rb', line 13

def read
  open(@url, proxy: @proxy) do |rss|
    return RSS::Parser.parse(rss, false)
  end
end