Exception: Sharepoint::DataError

Inherits:
Error
  • Object
show all
Defined in:
lib/sharepoint-errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(data, uri = nil, body = nil) ⇒ DataError

Returns a new instance of DataError.



6
7
8
9
10
# File 'lib/sharepoint-errors.rb', line 6

def initialize data, uri = nil, body = nil
  @data = data['error']
  @uri  = uri
  @body = body
end

Instance Method Details

#codeObject



14
# File 'lib/sharepoint-errors.rb', line 14

def code         ; @data['code'] ; end

#langObject



12
# File 'lib/sharepoint-errors.rb', line 12

def lang         ; @data['message']['lang']  ; end

#messageObject



13
# File 'lib/sharepoint-errors.rb', line 13

def message      ; @data['message']['value'] ; end

#request_bodyObject



16
# File 'lib/sharepoint-errors.rb', line 16

def request_body ; @body ; end

#uriObject



15
# File 'lib/sharepoint-errors.rb', line 15

def uri          ; @uri ; end