title: How to receive back information for specific indexed items in Ruby?
body: <p>I have a CLI I'm trying to build with API data and I am unable to get my indexed individual episodes to print details such as episode title, description, writer, director and air date. I'm currently just trying to get title and description to work right now but keep running into errors or getting all the episodes descriptions and titles to print at once. Can anyone spot where I'm going wrong?</p>
  <p>Let me say I'm currently learning to code and this is my first CLI - please be kind!</p>
  <p>Here is the method I'm working on</p>
  <pre><code> def print_details(episode)
      puts &quot;here are some details&quot;
      puts EpisodeIndex::API.new.titles(episode.to_i)
      puts EpisodeIndex::API.new.description(episode.to_i)
   
    end
  </code></pre>
  <p>and then this is the error I'm getting (I wanted to have my main menu in there too so you could see where I'm going from. I am able to get the menu to list and I want to type &quot;2&quot; to get info about &quot;2. Diversity Day&quot; however I am getting an error...</p>
  <pre><code>Hello, friend!
  Here are some episodes from 'The Office'
  1. Pilot
  2. Diversity Day
  3. Health Care
  4. The Alliance
  5. Basketball
  6. Hot Girl
  7. The Dundies
  8. Sexual Harassment
  9. Office Olympics
  10. The Fire
  11. Halloween
  12. The Fight
  13. The Client
  14. Performance Review
  15. E-Mail Surveillance
  16. Christmas Party
  17. Booze Cruise
  18. The Injury
  19. The Secret
  20. The Carpet
  21. Boys and Girls
  22. Valentine's Day
  23. Dwight's Speech
  24. Take Your Daughter to Work Day
  25. Michael's Birthday
  26. Drug Testing
  27. Conflict Resolution
  28. Casino Night
  
  Type the episode number you want more information on.
  2
  here ae some details
  Traceback (most recent call last):
      4: from bin/office_cli:5:in `&lt;main&gt;'
      3: from /Users/jocelynpeters/Development/code/office_cli/lib/cli.rb:11:in `run'
      2: from /Users/jocelynpeters/Development/code/office_cli/lib/cli.rb:27:in `list_menu'
      1: from /Users/jocelynpeters/Development/code/office_cli/lib/cli.rb:47:in `print_details'
  /Users/jocelynpeters/Development/code/office_cli/lib/api.rb:11:in `titles': wrong number of arguments (given 1, expected 0) (ArgumentError)
  </code></pre>
  <p>I'm not sure if this is important but here's the API I'm using too: <a href="https://www.officeapi.dev/api/episodes/" rel="nofollow noreferrer">https://www.officeapi.dev/api/episodes/</a></p>
  <p>this is part of my API class</p>
  <pre><code>  
        def titles
          uri = URI.parse(@url)
          response = Net::HTTP.get(uri)
  
          data = JSON.parse(response)
          data[&quot;data&quot;].map do |episode|
          Episode.new(episode)
              episode[&quot;title&quot;]
              
          end
  </code></pre>