{"comment":{"created_at":"2011-10-16T02:46:27Z","body":"Yep, it definitely feels odd to have a special case on `Proc` where your intention may actually be to extend an instance of `Proc`, I think we'll need a separate method for the 'extend self referenced by Proc' case.\r\n\r\nIt is a highly valuable feature, though, because of this trick:\r\n\r\n```ruby\r\nmodule DSLMethods \r\n  def after_deject receiver\r\n    receiver.remove_instance_variable(:@proxy)\r\n  end\r\n  module_function :after_deject \r\n\r\n  def option(*args)\r\n     @proxy.option(*args)\r\n  end\r\n\r\n  def proxy\r\n    @proxy = MyDSL.new\r\n  end\r\nend \r\n\r\ndef DSL &block\r\n  Inject(DSLMethods, &block) do \r\n    block.call\r\n  end\r\nend\r\n\r\nDSL do\r\n  option :foo, true\r\nend\r\n```\r\n\r\nKeeping the calling scope is something I love my DSLs being able to do.","updated_at":"2011-10-16T02:46:27Z","url":"https://api.github.com/repos/robgleeson/inject/issues/comments/2418773","id":2418773,"user":{"gravatar_id":"22ca530c1db575f0a62b68c1900d8399","avatar_url":"https://secure.gravatar.com/avatar/22ca530c1db575f0a62b68c1900d8399?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/robgleeson","id":77573,"login":"robgleeson"}},"action":"created","issue":{"number":1,"created_at":"2011-10-15T04:31:00Z","pull_request":{"diff_url":"https://github.com/robgleeson/inject/pull/1.diff","patch_url":"https://github.com/robgleeson/inject/pull/1.patch","html_url":"https://github.com/robgleeson/inject/pull/1"},"body":"Just a small addition :)\r\n\r\nIf you feel annoyed about the whitespace and gitignoring stuff, feel free to cherry-pick only what you feel useful.\r\n\r\nCheers!","comments":12,"title":"Added support for multiple modules injection","updated_at":"2011-10-16T02:46:27Z","url":"https://api.github.com/repos/robgleeson/inject/issues/1","id":1916264,"assignee":null,"milestone":null,"closed_at":"2011-10-15T18:50:46Z","user":{"gravatar_id":"cb4eb85022db43d2fc875b992523e062","avatar_url":"https://secure.gravatar.com/avatar/cb4eb85022db43d2fc875b992523e062?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/riccieri","id":486508,"login":"riccieri"},"html_url":"https://github.com/robgleeson/inject/issues/1","labels":[],"state":"closed"},"legacy":{"issue_id":1916264,"comment_id":2418773}}