Class: RubyAem::Node
- Inherits:
-
Object
- Object
- RubyAem::Node
- Defined in:
- lib/ruby_aem/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.
27 28 29 30 31 32 33 34 35 |
# File 'lib/ruby_aem/node.rb', line 27 def initialize(client, path, name) @client = client @info = { path: path, name: name } @info[:path] = RubyAem::Swagger.path(@info[:path]) end |
Instance Method Details
#create(type) ⇒ Object
Create a new node.
41 42 43 44 |
# File 'lib/ruby_aem/node.rb', line 41 def create(type) @info[:type] = type @client.call(self.class, __callee__.to_s, @info) end |
#delete ⇒ Object
Delete the node.
49 50 51 |
# File 'lib/ruby_aem/node.rb', line 49 def delete() @client.call(self.class, __callee__.to_s, @info) end |
#exists ⇒ Object
Check whether the node exists or not. If the node exists, this method returns a success result. Otherwise it returns a failure result.
58 59 60 |
# File 'lib/ruby_aem/node.rb', line 58 def exists() @client.call(self.class, __callee__.to_s, @info) end |