Class: Ansible::Inventory::Host::Collection

Inherits:
Array
  • Object
show all
Defined in:
lib/ansible/inventory.rb

Instance Method Summary collapse

Instance Method Details

#add(*args) ⇒ Object



97
98
99
100
101
102
103
104
105
# File 'lib/ansible/inventory.rb', line 97

def add(*args)
  host = if args.first.is_a?(Host)
    args.first
  else
    Host.new(*args)
  end
  self << host
  host
end