Class: Magellan::Rake::BrokenLinkTask
- Inherits:
-
BaseMagellanTask
- Object
- Rake::TaskLib
- BaseMagellanTask
- Magellan::Rake::BrokenLinkTask
- Defined in:
- lib/magellan/rake/broken_link_task.rb
Overview
Example: require ‘magellan/rake/broken_link_task’ Magellan::Rake::BrokenLinkTask.new(“digg”) do |t|
t.origin_url = "http://digg.com/"
t.explore_depth = 3
end
Instance Attribute Summary
Attributes inherited from BaseMagellanTask
#explore_depth, #failure_log, #ignored_urls, #links_to_explore, #origin_url, #success_message
Instance Method Summary collapse
-
#create_observer ⇒ Object
:nodoc:.
-
#description ⇒ Object
:nodoc:.
-
#initialize(name = "magellan:explore") ⇒ BrokenLinkTask
constructor
Defines a new task, using the name
name
.
Methods inherited from BaseMagellanTask
Constructor Details
#initialize(name = "magellan:explore") ⇒ BrokenLinkTask
Defines a new task, using the name name
.
17 18 19 20 21 |
# File 'lib/magellan/rake/broken_link_task.rb', line 17 def initialize(name="magellan:explore") @links_to_explore = [["a","href"],["script","src"],["img","src"]] @success_message = "No broken links were found!" super(name) end |
Instance Method Details
#create_observer ⇒ Object
:nodoc:
23 24 25 |
# File 'lib/magellan/rake/broken_link_task.rb', line 23 def create_observer # :nodoc: Magellan::BrokenLinkTracker.new end |
#description ⇒ Object
:nodoc:
27 28 29 |
# File 'lib/magellan/rake/broken_link_task.rb', line 27 def description # :nodoc: "explore #{@origin_url} for broken links" end |