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.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/retriever/cli.rb', line 3 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 #all fetch modes @fetch.dump @fetch.write if [:filename] #fileharvest only @fetch.autodownload if [:autodown] && [:fileharvest] #sitemap only @fetch.gen_xml if /XML/i =~ [:sitemap].to_s end |