Class: Podtergeist::Feed

Inherits:
Object
  • Object
show all
Defined in:
lib/podtergeist/feed.rb

Class Method Summary collapse

Class Method Details

.add(feed, params) ⇒ Object



12
13
14
15
# File 'lib/podtergeist/feed.rb', line 12

def add(feed,params)
  create_channel(feed,params) unless feed_exists?(feed)
  append_item(feed,params)
end

.existing(feed, params) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/podtergeist/feed.rb', line 17

def existing(feed,params)
  shows = Dir.glob("#{params['local_directory']}/*.{m4a,mp3}")
  create_channel(feed,params,shows.first)
  shows.each do |file|
    append_item(feed,params,file)
  end
end