Class: RubyAem::Resources::Node
- Inherits:
-
Object
- Object
- RubyAem::Resources::Node
- Defined in:
- lib/ruby_aem/resources/node.rb
Overview
Node class contains API calls related to managing an AEM node.
Instance Method Summary collapse
-
#create(type) ⇒ Object
Create a new node.
-
#delete ⇒ Object
Delete the node.
-
#exists ⇒ Object
Check whether the node exists or not.
-
#initialize(client, path, name) ⇒ Object
constructor
Initialise a node.
Constructor Details
#initialize(client, path, name) ⇒ Object
Initialise a node.
28 29 30 31 32 33 34 35 36 |
# File 'lib/ruby_aem/resources/node.rb', line 28 def initialize(client, path, name) @client = client @call_params = { path: path, name: name } @call_params[:path] = RubyAem::Swagger.path(@call_params[:path]) end |
Instance Method Details
#create(type) ⇒ Object
Create a new node.
42 43 44 45 |
# File 'lib/ruby_aem/resources/node.rb', line 42 def create(type) @call_params[:type] = type @client.call(self.class, __callee__.to_s, @call_params) end |
#delete ⇒ Object
Delete the node.
50 51 52 |
# File 'lib/ruby_aem/resources/node.rb', line 50 def delete() @client.call(self.class, __callee__.to_s, @call_params) end |
#exists ⇒ Object
Check whether the node exists or not. If the node exists, this method returns a true result data, false otherwise.
59 60 61 |
# File 'lib/ruby_aem/resources/node.rb', line 59 def exists() @client.call(self.class, __callee__.to_s, @call_params) end |