Class: FfffoundParser::Parser
- Inherits:
-
Object
- Object
- FfffoundParser::Parser
- Defined in:
- lib/ffffound_parser/parser.rb
Constant Summary collapse
- SITE_LINK =
'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
-
#image_list ⇒ Object
readonly
Returns the value of attribute image_list.
Instance Method Summary collapse
-
#initialize(page_number = 1) ⇒ Parser
constructor
A new instance of Parser.
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_list ⇒ Object (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 |