Class: Pluto::Updater
- Inherits:
-
Object
- Object
- Pluto::Updater
- Includes:
- LogUtils::Logging
- Defined in:
- lib/pluto/updater.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(opts, config) ⇒ Updater
constructor
A new instance of Updater.
- #run ⇒ Object
Constructor Details
#initialize(opts, config) ⇒ Updater
Returns a new instance of Updater.
7 8 9 10 |
# File 'lib/pluto/updater.rb', line 7 def initialize( opts, config ) @opts = opts @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
12 13 14 |
# File 'lib/pluto/updater.rb', line 12 def config @config end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
12 13 14 |
# File 'lib/pluto/updater.rb', line 12 def opts @opts end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/pluto/updater.rb', line 14 def run ################### # step 1) update subscriptions subscriber = Subscriber.new # pass along debug/verbose setting/switch subscriber.debug = true if opts.verbose? subscriber.update_subscriptions( config ) ############################## # step 2) update feeds refresher = Refresher.new # pass along debug/verbose setting/switch refresher.debug = true if opts.verbose? refresher.update_feeds end |