Class: Crawlberg::CrawlEventError

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
CrawlEvent
Defined in:
lib/crawlberg/native.rb

Overview

An error occurred while crawling a URL.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



194
195
196
# File 'lib/crawlberg/native.rb', line 194

def error
  @error
end

#urlObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



194
195
196
# File 'lib/crawlberg/native.rb', line 194

def url
  @url
end

Class Method Details

.from_hash(hash) ⇒ Object



215
216
217
# File 'lib/crawlberg/native.rb', line 215

def self.from_hash(hash)
  new(url: hash[:url] || hash["url"], error: hash[:error] || hash["error"])
end

Instance Method Details

#complete?Boolean

Returns:

  • (Boolean)


211
212
213
# File 'lib/crawlberg/native.rb', line 211

def complete? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]

#error?Boolean

Returns:

  • (Boolean)


209
# File 'lib/crawlberg/native.rb', line 209

def error? = true

#page?Boolean

Returns:

  • (Boolean)


207
# File 'lib/crawlberg/native.rb', line 207

def page? = false