Class: Crawlberg::CrawlEventComplete

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

Overview

The crawl has completed.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pages_crawledObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



203
204
205
# File 'lib/crawlberg/native.rb', line 203

def pages_crawled
  @pages_crawled
end

Class Method Details

.from_hash(hash) ⇒ Object



219
220
221
# File 'lib/crawlberg/native.rb', line 219

def self.from_hash(hash)
  new(pages_crawled: hash[:pages_crawled] || hash["pages_crawled"])
end

Instance Method Details

#complete?Boolean

Returns:

  • (Boolean)


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

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

#error?Boolean

Returns:

  • (Boolean)


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

def error? = false

#page?Boolean

Returns:

  • (Boolean)


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

def page? = false