How to find a clue about the method and its parameters from the command line?

I'm a beginner developer in ruby on rails. I would really help if I could get a hint about the parameters of the method (for example, File.open) from a command prompt. For example help File.open.
June 14th 19 at 20:45
3 answers
June 14th 19 at 20:47
June 14th 19 at 20:49
Replace the standard irb to pry
gem install pry
gem install pry-doc (if desired standarta Liba)
pry

Now you have access to a lot of useful commands (full list available via help), for example:
"ls File" - a list of all methods for object of class File
"$ File.open" - the source code of the method
"? File.open" docks to this method
June 14th 19 at 20:51
irb

--help
Array#sort
Array.new
File.open

Find more questions by tags Ruby on Rails