Class: JustCrawl::Failure
- Inherits:
-
Object
- Object
- JustCrawl::Failure
- Defined in:
- lib/just_crawl/failure.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
Instance Method Summary collapse
- #error? ⇒ Boolean
- #failure? ⇒ Boolean
-
#initialize(link, code, from) ⇒ Failure
constructor
A new instance of Failure.
- #location ⇒ Object
- #message ⇒ Object
- #name ⇒ Object
Constructor Details
#initialize(link, code, from) ⇒ Failure
Returns a new instance of Failure.
6 7 8 9 10 |
# File 'lib/just_crawl/failure.rb', line 6 def initialize(link, code, from) @link = link @code = code @from = from end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/just_crawl/failure.rb', line 4 def code @code end |
#from ⇒ Object (readonly)
Returns the value of attribute from.
4 5 6 |
# File 'lib/just_crawl/failure.rb', line 4 def from @from end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
4 5 6 |
# File 'lib/just_crawl/failure.rb', line 4 def link @link end |
Instance Method Details
#error? ⇒ Boolean
16 17 18 |
# File 'lib/just_crawl/failure.rb', line 16 def error? !failure? end |
#failure? ⇒ Boolean
12 13 14 |
# File 'lib/just_crawl/failure.rb', line 12 def failure? true end |
#location ⇒ Object
28 29 30 |
# File 'lib/just_crawl/failure.rb', line 28 def location "Linked from #{from}" end |
#message ⇒ Object
24 25 26 |
# File 'lib/just_crawl/failure.rb', line 24 def "Status code was #{code}" end |
#name ⇒ Object
20 21 22 |
# File 'lib/just_crawl/failure.rb', line 20 def name link end |