Class: Epodder::Catchup
Instance Method Summary collapse
Methods inherited from Verb
#add_command, #each_argument, #lookup_args, #verb_struct
Methods inherited from Eclass
Constructor Details
This class inherits a constructor from Epodder::Eclass
Instance Method Details
#catchup(args) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/verb/catchup.rb', line 3 def catchup args if args.empty? podcasts = Podcast.all else podcasts = args.map {|id| Podcast.get(id.to_i)} end podcasts.each do |podcast| Episode.all(:downloaded => false, :podcast => podcast).update(:downloaded => true) end end |