文件名称:indifferent_eval:Ruby 库 DSL 的块评估模式
文件大小:6KB
文件格式:ZIP
更新时间:2024-07-03 21:07:24
Ruby
冷漠评价 当您制作 Ruby DSL 时,您通常必须在以下各项之间做出决定: # Use a block variable to access the MyConfig instance. # This gives you the benefit of having access to the outer "self" inside of the block. MyApp . config do | config | config . verbosity true config . foo :bar end 和: # Don't pass a block variable. All method calls are sent to the MyConfig instance. # This has the benefit of looking really
【文件预览】:
indifferent_eval-master
----indifferent_eval.gemspec(878B)
----lib()
--------indifferent_eval.rb(73B)
--------indifferent_eval()
----Gemfile(26B)
----spec()
--------indifferent_eval_spec.rb(2KB)
----Rakefile(241B)
----README.markdown(3KB)
----.ci(97B)
----.gitignore(93B)
----sample.rb(616B)