Changeset 14
- Timestamp:
- 07/09/06 00:17:35 (3 years ago)
- Files:
-
- www-raa/lib/www/raa.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
www-raa/lib/www/raa.rb
r13 r14 12 12 end 13 13 14 # Returns an array of Entry objects based on a search of the RAA. These 15 # are the same results that would be returned if you had used the search 16 # feature on the RAA itself. 17 #-- 18 # TODO: finish 14 # Returns an array of RAA::Entry objects based on a search of the RAA. 15 # These are the same results that would be returned if you had used the 16 # search feature on the RAA web page itself. 17 # 19 18 def search(project) 19 entries = [] 20 20 mech = WWW::Mechanize.new 21 21 mech.get(HOME_PAGE + "/search.rhtml?search=#{project}") 22 mech.page.links.each{ |link| 23 if link.href =~ /^project\/(.*?)\/$/ 24 entries.push(RAA::Entry.new($1)) 25 end 26 } 27 entries 22 28 end 23 29 24 30 module_function :update_entry 31 module_function :search 25 32 26 33 # The Entry class represents a project entry on the RAA.
