Class: Aether::Node
- Inherits:
-
Object
- Object
- Aether::Node
- Defined in:
- lib/aether/node.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #hostname ⇒ Object (also: #fqdn)
-
#initialize(node) ⇒ Node
constructor
A new instance of Node.
- #ipaddress ⇒ Object (also: #local_ipv4)
Constructor Details
#initialize(node) ⇒ Node
Returns a new instance of Node.
6 7 8 9 |
# File 'lib/aether/node.rb', line 6 def initialize(node) @name = node.name @attributes = node.chef_attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
4 5 6 |
# File 'lib/aether/node.rb', line 4 def attributes @attributes end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/aether/node.rb', line 4 def name @name end |
Instance Method Details
#hostname ⇒ Object Also known as: fqdn
16 17 18 |
# File 'lib/aether/node.rb', line 16 def hostname @hostname ||= attributes.fqdn end |
#ipaddress ⇒ Object Also known as: local_ipv4
11 12 13 |
# File 'lib/aether/node.rb', line 11 def ipaddress @ipaddress ||= attributes.ipaddress end |