gpt4 book ai didi

ruby-on-rails - RAILS 命令行 ls

转载 作者:行者123 更新时间:2023-12-04 10:46:22 25 4
gpt4 key购买 nike

我在 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自述文件:https://github.com/pry/pry

Pry allows us to pop in and out of different scopes (objects) using the cd command. This enables us to explore the run-time view of a program or library. To view which variables and methods are available within a particular scope we use the versatile ls command.

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com