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
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