Exception: Sharepoint::SPException
- Inherits:
-
SharepointError
- Object
- StandardError
- SharepointError
- Sharepoint::SPException
- Defined in:
- lib/sharepoint-ruby.rb
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(data, uri = nil, body = nil) ⇒ SPException
constructor
A new instance of SPException.
- #inspect ⇒ Object
- #lang ⇒ Object
- #message ⇒ Object
- #request_body ⇒ Object
- #uri ⇒ Object
Constructor Details
#initialize(data, uri = nil, body = nil) ⇒ SPException
Returns a new instance of SPException.
10 11 12 13 14 |
# File 'lib/sharepoint-ruby.rb', line 10 def initialize data, uri = nil, body = nil @data = data['error'] @uri = uri @body = body end |
Instance Method Details
#code ⇒ Object
18 |
# File 'lib/sharepoint-ruby.rb', line 18 def code ; @data['code'] ; end |
#inspect ⇒ Object
22 23 24 |
# File 'lib/sharepoint-ruby.rb', line 22 def inspect "#<Sharepoint::SPException: #{{'error'=>@data}}>" end |
#lang ⇒ Object
16 |
# File 'lib/sharepoint-ruby.rb', line 16 def lang ; @data['message']['lang'] ; end |
#message ⇒ Object
17 |
# File 'lib/sharepoint-ruby.rb', line 17 def ; @data['message']['value'] ; end |
#request_body ⇒ Object
20 |
# File 'lib/sharepoint-ruby.rb', line 20 def request_body ; @body ; end |
#uri ⇒ Object
19 |
# File 'lib/sharepoint-ruby.rb', line 19 def uri ; @uri ; end |