Module: UnitHosting::Groups

Defined in:
lib/unit-hosting/group.rb

Instance Method Summary collapse

Instance Method Details

#idsObject



27
28
29
# File 'lib/unit-hosting/group.rb', line 27

def ids
  collect { |g| g.instance_id }
end

#tablizeObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/unit-hosting/group.rb', line 15

def tablize
  return "no groups" if length == 0
  table = Mutter::Table.new(:delimiter => '|') do
    column :style => :green
    column
  end
  each do |group|
    table << [group.instance_id, group.name]
  end
  table.to_s if length > 0
end

#updateObject



10
11
12
13
# File 'lib/unit-hosting/group.rb', line 10

def update
  each { |g| g.update}
  self
end