Sha256: c66f2214ebb289d61d17bfe54e151cf09d2ce5387d856e6f375f542ac2b47be4
Contents?: true
Size: 397 Bytes
Versions: 4
Compression:
Stored size: 397 Bytes
Contents
class CommentsInfoParser def initialize(comments_element) @element = comments_element.search("a")[1] end def parse comments_info = nil if @element && @element['href'] =~ /id/ comments = @element.inner_html.split[0].to_i comments_page = @element['href'] comments_info = CommentsInfo.new(comments, comments_page) end return comments_info end end
Version data entries
4 entries across 4 versions & 1 rubygems