Exception: GDataPlus::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
lib/gdata_plus/exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Exception

Returns a new instance of Exception.



5
6
7
8
9
10
11
12
13
# File 'lib/gdata_plus/exception.rb', line 5

def initialize(response)
  @response = response

  if @response.respond_to? :body
    super(@response.body)
  else
    super("no response provided")
  end
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/gdata_plus/exception.rb', line 3

def response
  @response
end