title: ArgumentError: wrong number of arguments (given 0, expected 1) Ruby
body: <blockquote>
    <p>ArgumentError: wrong number of arguments (given 0, expected 1).</p>
  </blockquote>
  
  <p>The code opens the file and looks at the paragraph and counts, the error
   is in the center of the code. An error occurs when a method is called(1).
   I can’t understand how to pass the argument methods.</p>
  
  <pre><code>@books = "You can use this knowledge to create small tools that might help."
  
  require "colorize"
  
  class Filecalculation
  
      def select
          loop do
              puts "# Will we search : calculation_lines paragraph(1)".cyan
              print "\n&gt;&gt;&gt;&gt;&gt;&gt; ".yellow
  
              input = gets.chomp
              search_method = "calc_#{input}"
              if (respond_to?(search_method))
  </code></pre>
  
  <p>I can’t understand how to pass the argument to this place.</p>
  
  <pre><code>                contents = send(search_method, @books)
              else
                  puts "Unknown input: #{input.inspect}, method #{search_method} not defined."
              end 
         end 
      end  
  
      # =================== calc_1 сounting words in Text File 
      def calc_1 paragraph            
          word_count = paragraph.split.length 
          puts "#{word_count} words"   
      end
  end
  
  Filecalculation.new.select
  </code></pre>