From: Ruby Geo Date: 2007-12-20T19:58:14+09:00 Subject: Checking results Hi I am having difficulty in passing the folowing class method, that takes three argument. Basically I need the method to display the right data after doing all the check ups. This is the method. ----------------------- def self.search_by_keyword(businesses, searched_keyword_as_array, flag_exact_or_partial_match) businesses.select do |b| #b.my_keywords.include(searched_keyword_as_array).true b.my_keywords.include?(searched_keyword_as_array ) #flag_exact_or_partial_match = true end end The object created from the class. =--------------------------------------------- bsn1 = Business.new("Steve", "02089293323", "22 lilly Road ") bsn1.add_keyword(KEYWORDS[0]) bsn1.add_keyword(KEYWORDS[2]) Method call ----------------------------------------- Business.search_by_keyword([bsn0, bsn1, bsn2], [KEYWORDS[0],KEYWORDS[2] ],false) # true here mean 'partial match' # will return bsn0 AND bsn1 -- Posted via http://www.ruby-forum.com/.