Skip to content

Commit

Permalink
associate result page object with result set
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGuteMoritz committed May 3, 2009
1 parent ce83688 commit 91f0edc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/f/finder.rb
Expand Up @@ -100,7 +100,7 @@ def parse(response = nil, &block)
if block_given?
@parse = block
else
@parse.call(response, result = F::Result.new(self))
@parse.call(response, result = F::Result.new(self, response))
return result
end
end
Expand Down
5 changes: 3 additions & 2 deletions lib/f/result.rb
Expand Up @@ -6,6 +6,7 @@ class PageError < StandardError
end

attr_accessor :header
attr_reader :page

class Item

Expand Down Expand Up @@ -39,8 +40,8 @@ def self.url_from_anchor_attr(*names)

url_from_anchor_attr :next_url, :previous_url

def initialize(finder)
@finder = finder
def initialize(finder, page)
@finder, @page = finder, page
@items = []
super(@items)
end
Expand Down

0 comments on commit 91f0edc

Please sign in to comment.