Class: Ansible::Inventory::Host
- Inherits:
-
Struct
- Object
- Struct
- Ansible::Inventory::Host
- Defined in:
- lib/ansible/inventory.rb
Defined Under Namespace
Classes: Collection
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#vars ⇒ Object
Returns the value of attribute vars.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, hash = {}) ⇒ Host
constructor
A new instance of Host.
Constructor Details
#initialize(name, hash = {}) ⇒ Host
92 93 94 95 |
# File 'lib/ansible/inventory.rb', line 92 def initialize(name, hash = {}) super(name) self.vars = ActiveSupport::HashWithIndifferentAccess.new(hash) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
91 92 93 |
# File 'lib/ansible/inventory.rb', line 91 def name @name end |
#vars ⇒ Object
Returns the value of attribute vars
91 92 93 |
# File 'lib/ansible/inventory.rb', line 91 def vars @vars end |
Instance Method Details
#==(other) ⇒ Object
96 97 98 |
# File 'lib/ansible/inventory.rb', line 96 def ==(other) (name == other.name) && (vars == other.vars) end |