Class: NewsFetcher::Commands::Remove
- Inherits:
-
NewsFetcher::Command
- Object
- Simple::CommandParser::Command
- NewsFetcher::Command
- NewsFetcher::Commands::Remove
- Defined in:
- lib/newsfetcher/commands/remove.rb
Instance Attribute Summary
Attributes inherited from NewsFetcher::Command
#dir, #log_level, #max_threads
Instance Method Summary collapse
Instance Method Details
#run(args) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/newsfetcher/commands/remove.rb', line 7 def run(args) super @profile.find_subscriptions(ids: args).each do |subscription| dir = subscription.dir or raise Error, "dir not set" dir.rmtree end end |