class BitBucket::Response

Contains methods and attributes that act on the response returned from the request

Constants

CONTENT_TYPE

Attributes

parser[RW]

Public Class Methods

define_parser(&block) click to toggle source
# File lib/bitbucket_rest_api/response.rb, line 15
def self.define_parser(&block)
  @parser = block
end

Public Instance Methods

parse_response?(env) click to toggle source
# File lib/bitbucket_rest_api/response.rb, line 23
def parse_response?(env)
  env[:body].respond_to? :to_str
end
response_type(env) click to toggle source
# File lib/bitbucket_rest_api/response.rb, line 19
def response_type(env)
  env[:response_headers][CONTENT_TYPE].to_s
end