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



173
174
175
# File 'lib/crawlberg/native.rb', line 173

def pages_crawled
  @pages_crawled
end

Class Method Details

.from_hash(hash) ⇒ Object



189
190
191
# File 'lib/crawlberg/native.rb', line 189

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

Instance Method Details

#complete?Boolean

Returns:

  • (Boolean)


185
186
187
# File 'lib/crawlberg/native.rb', line 185

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

#error?Boolean

Returns:

  • (Boolean)


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

def error? = false

#page?Boolean

Returns:

  • (Boolean)


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

def page? = false