31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/gtool/provision/orgunit.rb', line 31
def get(orgunit_name)
connection = Gtool::Auth.connection(options)
orgunit = GProv::Provision::OrgUnit.get(connection, orgunit_name)
fields = GProv::Provision::OrgUnit.attribute_names
field_names = GProv::Provision::OrgUnit.attribute_titles
if orgunit.nil?
say "Organizational unit '#{orgunit_name}' not found!", :red
else
properties = fields.map {|f| orgunit.send f}
print_table field_names.zip(properties)
end
end
|