Method: Pic2ch::Parsers::Thread#count
- Defined in:
- lib/pic2ch/parsers/thread.rb
#count ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/pic2ch/parsers/thread.rb', line 26 def count unless @count check_deleted count = doc.css('h2').text.scan(/\((\d+)\)$/).flatten.first.to_s raise NotFound, "count" if count.empty? @count = count.to_i end return @count end |