Class: Puree::Extractor::Server
- Inherits:
-
Object
- Object
- Puree::Extractor::Server
- Includes:
- API::Authentication
- Defined in:
- lib/puree/extractor/server.rb
Overview
Server extractor.
Instance Method Summary collapse
-
#get ⇒ Puree::Model::Server?
(also: #find)
Get server information.
-
#initialize(config) ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize(config) ⇒ Server
Returns a new instance of Server.
11 12 13 14 |
# File 'lib/puree/extractor/server.rb', line 11 def initialize(config) @resource_type = :server configure_api config end |
Instance Method Details
#get ⇒ Puree::Model::Server? Also known as: find
Get server information.
19 20 21 22 23 |
# File 'lib/puree/extractor/server.rb', line 19 def get raise 'Cannot perform a request without a configuration' if @config.nil? @response = @request.get resource_type: @resource_type set_content @response.body end |