Class: BitBucket::Response::Helpers

Inherits:
BitBucket::Response show all
Defined in:
lib/bitbucket_rest_api/response/helpers.rb

Constant Summary

Constants inherited from BitBucket::Response

CONTENT_TYPE

Instance Method Summary collapse

Methods inherited from BitBucket::Response

define_parser, #parse_response?, #response_type

Instance Method Details

#on_complete(env) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/bitbucket_rest_api/response/helpers.rb', line 6

def on_complete(env)
  env[:body].class.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
    include BitBucket::Result

    def env
      @env
    end

  RUBY_EVAL
  env[:body].instance_eval { @env = env }
end