Class: Orthanc::Plugin
- Inherits:
-
Object
- Object
- Orthanc::Plugin
- Includes:
- Response
- Defined in:
- lib/orthanc/plugins.rb
Instance Attribute Summary collapse
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
Instance Method Summary collapse
-
#explorerjs ⇒ Object
GET /plugins/explorer.js.
-
#fetch ⇒ Object
GET /plugins/id.
-
#initialize(id = nil) ⇒ Plugin
constructor
A new instance of Plugin.
Methods included from Response
#bool_to_num, #handle_response, #num_to_bool
Constructor Details
Instance Attribute Details
#base_uri ⇒ Object
Returns the value of attribute base_uri.
4 5 6 |
# File 'lib/orthanc/plugins.rb', line 4 def base_uri @base_uri end |
Instance Method Details
#explorerjs ⇒ Object
GET /plugins/explorer.js
12 13 14 |
# File 'lib/orthanc/plugins.rb', line 12 def explorerjs # Get the JavaScript code that is injected by plugins into Orthanc Explorer handle_response(base_uri["explorer.js"].get) end |
#fetch ⇒ Object
GET /plugins/id
17 18 19 |
# File 'lib/orthanc/plugins.rb', line 17 def fetch # Fetch API response handle_response(base_uri.get) end |