Class: Kreuzcrawl::CrawlEventError

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
CrawlEvent
Defined in:
lib/kreuzcrawl/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



152
153
154
# File 'lib/kreuzcrawl/native.rb', line 152

def error
  @error
end

#urlObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



152
153
154
# File 'lib/kreuzcrawl/native.rb', line 152

def url
  @url
end

Class Method Details

.from_hash(hash) ⇒ Object



171
172
173
# File 'lib/kreuzcrawl/native.rb', line 171

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

Instance Method Details

#complete?Boolean

Returns:

  • (Boolean)


167
168
169
# File 'lib/kreuzcrawl/native.rb', line 167

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

#error?Boolean

Returns:

  • (Boolean)


165
# File 'lib/kreuzcrawl/native.rb', line 165

def error? = true

#page?Boolean

Returns:

  • (Boolean)


163
# File 'lib/kreuzcrawl/native.rb', line 163

def page? = false