Class: FfffoundParser::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/ffffound_parser/parser.rb

Constant Summary collapse

'http://ffffound.com/?offset='
DATE_WORD_REGEXP =
/(\s?(\d+)\s(hours|minutes|days))+\s(ago)/
DATE_NUMBERS_REGEXP =
/(\d+\s\w+)/i

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(page_number = 1) ⇒ Parser

Returns a new instance of Parser.



12
13
14
15
16
# File 'lib/ffffound_parser/parser.rb', line 12

def initialize(page_number = 1)
  @page_number = page_number
  Struct.new('Image', :link, :posted_at)
  @image_list = parse(target_page)
end

Instance Attribute Details

#image_listObject (readonly)

Returns the value of attribute image_list.



10
11
12
# File 'lib/ffffound_parser/parser.rb', line 10

def image_list
  @image_list
end