Class: Retriever::CLI
- Inherits:
-
Object
- Object
- Retriever::CLI
- Defined in:
- lib/retriever/cli.rb
Instance Method Summary collapse
-
#initialize(url, options) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize(url, options) ⇒ CLI
Returns a new instance of CLI.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/retriever/cli.rb', line 4 def initialize(url, ) # kick off the fetch mode of choice if ['fileharvest'] @fetch = Retriever::FetchFiles.new(url, ) elsif ['sitemap'] @fetch = Retriever::FetchSitemap.new(url, ) elsif ['seo'] @fetch = Retriever::FetchSEO.new(url, ) else fail '### Error: No Mode Selected' end @fetch.dump @fetch.write if ['filename'] @fetch.autodownload if ['autodown'] && ['fileharvest'] @fetch.gen_xml if /XML/i =~ ['sitemap'].to_s end |