Checking results

R

Ruby Geo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Partial Search 1
Metho Error 2
method use ? 1
Printing result of class method 1
Search Array 0
Partial Search 0
Interface checking 1
[SUMMARY] Checking Credit Cards (#122) 17

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top