Class: Clownfish::Count

Inherits:
Object
  • Object
show all
Defined in:
lib/clownfish/fish/count.rb

Overview

Clownfish that counts number of pages on a site. Taken from Anemone.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#countObject (readonly)

Number of pages found. Only meaningful after a crawl.



5
6
7
# File 'lib/clownfish/fish/count.rb', line 5

def count
  @count
end

Instance Method Details

#after_crawl(page_store) ⇒ Object



7
8
9
# File 'lib/clownfish/fish/count.rb', line 7

def after_crawl(page_store)
  @count = page_store.uniq!.size
end