Exception: Sharepoint::SPException

Inherits:
Exception
  • Object
show all
Defined in:
lib/sharepoint-ruby.rb

Instance Method Summary collapse

Constructor Details

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


9
10
11
12
13
# File 'lib/sharepoint-ruby.rb', line 9

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

Instance Method Details

#codeObject


17
# File 'lib/sharepoint-ruby.rb', line 17

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

#langObject


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

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

#messageObject


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

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

#request_bodyObject


19
# File 'lib/sharepoint-ruby.rb', line 19

def request_body ; @body ; end

#uriObject


18
# File 'lib/sharepoint-ruby.rb', line 18

def uri          ; @uri ; end