lib/github_api/response/helpers.rb in github_api-0.3.9 vs lib/github_api/response/helpers.rb in github_api-0.4.0
- old
+ new
@@ -4,10 +4,17 @@
module Github
class Response::Helpers < Response
def on_complete(env)
- env[:body].extend(Github::Result)
+ env[:body].class.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
+ include Github::Result
+
+ def env
+ @env
+ end
+
+ RUBY_EVAL
env[:body].instance_eval { @env = env }
end
end # Response::Helpers
end # Github