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



121
122
123
# File 'lib/ansible/inventory.rb', line 121

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

#add(*args) ⇒ Object



117
118
119
120
# File 'lib/ansible/inventory.rb', line 117

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