method_not_missing:因为露比

时间:2024-05-21 19:38:51
【文件属性】:

文件名称:method_not_missing:因为露比

文件大小:7KB

文件格式:ZIP

更新时间:2024-05-21 19:38:51

Ruby

方法不丢失 通过在rubydoc.info上搜索它们的实现来即时实现缺少的方法。 因为露比 在需要时添加实例变量,并且在运行时还声明缺少的类。 如果找到的实现引发错误(如堆栈溢出)或嵌套方法查找失败,则存在一些回溯。 安装 gem install method_not_missing 外部依赖 PhantomJS(在OSX上brew install phantomjs ) 例子 require "method_not_missing" object = MethodNotMissing :: OmnipotentObject . new object . update ( [ 3 ] ) ## Googling... #=> [3] object . update ( [ 4 ] ) #=> [3, 4] object . inspect #=> #<MethodNotMissing:


【文件预览】:
method_not_missing-main
----LICENSE.txt(1KB)
----lib()
--------method_not_missing.rb(1KB)
--------method_not_missing()
----Gemfile(39B)
----Rakefile(149B)
----.travis.yml(30B)
----test()
--------test_method_not_missing.rb(331B)
----README.md(2KB)
----method_not_missing.gemspec(1KB)
----.gitignore(185B)

网友评论