Class: RssNotifier::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/rss_notifier/cli.rb

Instance Method Summary collapse

Instance Method Details

#initObject



11
12
13
# File 'lib/rss_notifier/cli.rb', line 11

def init
  RssNotifier::App.init(force: options.force?)
end

#startObject



22
23
24
25
26
27
28
29
# File 'lib/rss_notifier/cli.rb', line 22

def start
  unless options.notify?
    RssNotifier.logger.warn "Notifcation is disabled. To enable, run $ rss_notifier start --notify".red
  end

  app = RssNotifier::App.new(notify: options.notify?)
  app.run
end

#versionObject



16
17
18
# File 'lib/rss_notifier/cli.rb', line 16

def version
  puts RssNotifier::VERSION
end