我在 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

..... 等等

那么它是什么意思呢?它向我们展示了项目中所有可用的方法吗?

谢谢。

最佳答案

来自 pry README:https://github.com/pry/pry

关于ruby-on-rails - RAILS 命令行 ls,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/43891755/

10-10 02:48