Class: Magellan::Rake::ExpectedLinksTask
- Inherits:
-
BaseMagellanTask
- Object
- Rake::TaskLib
- BaseMagellanTask
- Magellan::Rake::ExpectedLinksTask
- Defined in:
- lib/magellan/rake/expected_links_task.rb
Instance Attribute Summary collapse
-
#patterns_and_expected_links ⇒ Object
Returns the value of attribute patterns_and_expected_links.
Attributes inherited from BaseMagellanTask
#explore_depth, #failure_log, #ignored_urls, #links_to_explore, #origin_url, #success_message
Instance Method Summary collapse
- #create_observer ⇒ Object
- #description ⇒ Object
-
#initialize(name = "magellan:check_links") ⇒ ExpectedLinksTask
constructor
A new instance of ExpectedLinksTask.
Methods inherited from BaseMagellanTask
Constructor Details
#initialize(name = "magellan:check_links") ⇒ ExpectedLinksTask
Returns a new instance of ExpectedLinksTask.
12 13 14 15 16 |
# File 'lib/magellan/rake/expected_links_task.rb', line 12 def initialize(name="magellan:check_links") @success_message = "All expected links found!" @links_to_explore = [["a","href"]] super(name) end |
Instance Attribute Details
#patterns_and_expected_links ⇒ Object
Returns the value of attribute patterns_and_expected_links.
10 11 12 |
# File 'lib/magellan/rake/expected_links_task.rb', line 10 def patterns_and_expected_links @patterns_and_expected_links end |
Instance Method Details
#create_observer ⇒ Object
22 23 24 |
# File 'lib/magellan/rake/expected_links_task.rb', line 22 def create_observer Magellan::ExpectedLinksTracker.new(@patterns_and_expected_links) end |
#description ⇒ Object
18 19 20 |
# File 'lib/magellan/rake/expected_links_task.rb', line 18 def description "Explore #{@origin_url} and find check if all given patterns are matched" end |