Class: Crawler::Cinema::Provider::Entries

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/crawler/cinema/provider.rb

Instance Method Summary collapse

Constructor Details

#initialize(method_name) ⇒ Entries

Returns a new instance of Entries.



18
19
20
# File 'lib/crawler/cinema/provider.rb', line 18

def initialize(method_name)
  @method_name = method_name
end

Instance Method Details

#eachObject



22
23
24
25
26
27
28
29
# File 'lib/crawler/cinema/provider.rb', line 22

def each
  providers = Provider.new
  providers.each do |provider|
    provider.public_send(@method_name).each do |entry|
      yield entry
    end
  end
end