Class: ProgramTV::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/program-tv/parser.rb

Instance Method Summary collapse

Constructor Details

#initializeParser

Returns a new instance of Parser.



4
5
6
# File 'lib/program-tv/parser.rb', line 4

def initialize
  @agent = Mechanize.new
end

Instance Method Details

#runObject

Runs dynamic-sprites command.



10
11
12
13
14
# File 'lib/program-tv/parser.rb', line 10

def run
  ProgramTV.selected_channels.map do |url_name, epg_name|
    schedule(epg_name, "http://www.cyfrowypolsat.pl/program-tv/#{url_name}")
  end.compact
end