Class: Pluto::Fetcher

Inherits:
Object
  • Object
show all
Includes:
LogUtils::Logging
Defined in:
lib/pluto/fetcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts, config) ⇒ Fetcher

Returns a new instance of Fetcher.



8
9
10
11
# File 'lib/pluto/fetcher.rb', line 8

def initialize( opts, config )
  @opts    = opts
  @config  = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



13
14
15
# File 'lib/pluto/fetcher.rb', line 13

def config
  @config
end

#optsObject (readonly)

Returns the value of attribute opts.



13
14
15
# File 'lib/pluto/fetcher.rb', line 13

def opts
  @opts
end

Instance Method Details

#runObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/pluto/fetcher.rb', line 16

def run

  updater = Updater.new

  # pass along debug/verbose setting/switch
  updater.debug = true    if opts.verbose?

  updater.update_subscriptions( config )
  updater.update_feeds

end