Class: NewsFetcher::Commands::Add
- Inherits:
-
NewsFetcher::Command
- Object
- Simple::CommandParser::Command
- NewsFetcher::Command
- NewsFetcher::Commands::Add
- Defined in:
- lib/newsfetcher/commands/add.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/add.rb', line 7 def run(args) super uri, path, id = *args raise Error, "No URI specified" unless uri dir = @profile.add_subscription(uri: uri, id: id, path: path) warn "Added subscription: #{dir}" end |