Class: Ansible::Inventory::Group::Collection

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

Instance Method Summary collapse

Instance Method Details

#[](name) ⇒ Object


132
133
134
# File 'lib/ansible/inventory.rb', line 132

def [](name)
  find {|group| group.name == name}
end

#add(*args) ⇒ Object


128
129
130
131
# File 'lib/ansible/inventory.rb', line 128

def add(*args)
  self << group = Group.new(*args)
  group
end