Command line RAILS ls
I found a method in Rails ls
.
pry(#<SettingsController>)> ls
ActiveSupport::ToJsonWithActiveSupportEncoder#methods: to_json
ActiveSupport::Configurable#methods: config
AbstractController::Base#methods: action_methods action_name action_name= available_action? controller_path response_body
ActionController::Metal#methods:
content_type controller_name headers location= middleware_stack= performed? request= response response_body= session set_response! status=
content_type= dispatch location middleware_stack middleware_stack? request reset_session response= response_code set_request! status to_a
#<Module:0x0000000551b030>#methods: env
..... etc.
So what does this mean? Does it show us all the available methods in the project?
Thank.
+3
source to share
1 answer
From the pry
README: https://github.com/pry/pry
Pry allows us to enter and exit different areas (objects) using the cd command. This allows us to examine the execution time of a program or library. To see what variables and methods are available in a specific scope, we use the generic ls command .
+2
source to share