Metho Error

Why do I get the folowing error when I run this method ? ?

wrong number of arguments (2 for 3) (ArgumentError)
        from C:/Ruby/methodscop/lib/new_class.rb:65

···

--------------------------------------------------------------------

  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 )
     end
   end
--
Posted via http://www.ruby-forum.com/.

Why do I get the folowing error when I run this method ? ?

wrong number of arguments (2 for 3) (ArgumentError)

Seriously? Well, I'm going to go out on a limb and guess that you only
passed in two arguments instead of three. Or at least I think that's
what "wrong number of arguments (2 for 3)" would mean.

···

On Dec 19, 7:55 am, Ruby Geo <ruby...@googlemail.com> wrote:

        from C:/Ruby/methodscop/lib/new_class.rb:65
--------------------------------------------------------------------

  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 )
     end
   end
--
Posted viahttp://www.ruby-forum.com/.

yermej wrote:

···

On Dec 19, 7:55 am, Ruby Geo <ruby...@googlemail.com> wrote:

Why do I get the folowing error when I run this method ? ?

wrong number of arguments (2 for 3) (ArgumentError)

Seriously? Well, I'm going to go out on a limb and guess that you only
passed in two arguments instead of three. Or at least I think that's
what "wrong number of arguments (2 for 3)" would mean.

well that's true I passed only two argument. But my question is How do
I use that method in order to display this.

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/\.