查看网站首页
查看网站首页
查看 sitemap.xml
✏️ 正在编辑: singleton_methods-i.yaml
路径:
/opt/alt/ruby18/share/ri/1.8/system/Object/singleton_methods-i.yaml
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Returns an array of the names of singleton methods for <em>obj</em>. If the optional <em>all</em> parameter is true, the list will include methods in modules included in <em>obj</em>. - !ruby/struct:SM::Flow::VERB body: " module Other\n def three() end\n end\n\n class Single\n def Single.four() end\n end\n\n a = Single.new\n\n def a.one()\n end\n\n class << a\n include Other\n def two()\n end\n end\n\n Single.singleton_methods #=> ["four"]\n a.singleton_methods(false) #=> ["two", "one"]\n a.singleton_methods #=> ["two", "one", "three"]\n" full_name: Object#singleton_methods is_singleton: false name: singleton_methods params: | obj.singleton_methods(all=true) => array visibility: public
💾 保存文件
← 返回文件管理器