Class: Rest::BaseResponseWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/rest/wrappers/base_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#triesObject

Returns the value of attribute tries.



39
40
41
# File 'lib/rest/wrappers/base_wrapper.rb', line 39

def tries
  @tries
end

Instance Method Details

#headersObject

Provide a headers_orig method in your wrapper to allow this to work



42
43
44
45
46
47
48
49
50
51
# File 'lib/rest/wrappers/base_wrapper.rb', line 42

def headers
  new_h = {}
  headers_orig.each_pair do |k, v|
    if v.is_a?(Array) && v.size == 1
      v = v[0]
    end
    new_h[k.downcase] = v
  end
  new_h
end