class MyEpisodes::Shows
Public Class Methods
new(parser)
click to toggle source
# File lib/my_episodes/shows.rb, line 7 def initialize(parser) @shows = [] @parser = parser end
Public Instance Methods
create(links)
click to toggle source
# File lib/my_episodes/shows.rb, line 12 def create(links) links.each do |link| name = link.text page = link.click rows = @parser.parse(page) @shows << Show.new(name).create(rows) end self end
each(&block)
click to toggle source
# File lib/my_episodes/shows.rb, line 23 def each(&block) @shows.each(&block) end