summaryrefslogtreecommitdiff
path: root/examples/ruby
diff options
context:
space:
mode:
authorArvin Schnell <aschnell@suse.de>2007-07-25 13:56:27 +0000
committerArvin Schnell <aschnell@suse.de>2007-07-25 13:56:27 +0000
commitd6ac3d222488959fd044f0433bbe82b4ef95e250 (patch)
treea43337e303c958bc824b63970b651664a28ce567 /examples/ruby
parent0f35ecf49cb8723a24b11435f7717f8b0d8821e5 (diff)
downloadlibzypp-bindings-d6ac3d222488959fd044f0433bbe82b4ef95e250.tar.gz
libzypp-bindings-d6ac3d222488959fd044f0433bbe82b4ef95e250.tar.bz2
libzypp-bindings-d6ac3d222488959fd044f0433bbe82b4ef95e250.zip
- some work on capabilities
Diffstat (limited to 'examples/ruby')
-rw-r--r--examples/ruby/list_target_resolvables.rb19
1 files changed, 15 insertions, 4 deletions
diff --git a/examples/ruby/list_target_resolvables.rb b/examples/ruby/list_target_resolvables.rb
index a4e40ea..da88a0d 100644
--- a/examples/ruby/list_target_resolvables.rb
+++ b/examples/ruby/list_target_resolvables.rb
@@ -12,11 +12,22 @@ r = z.target.resolvables
# puts r.class
r.each do | p |
+
# puts p.class
puts "#{p.kind_to_s} #{p.name} #{p.edition.to_s} #{p.arch.to_s}"
- puts " #{p.summary}"
- puts " #{p.size}"
- puts " #{p.vendor}"
- puts " #{p.buildtime}"
+ puts " Summary: #{p.summary}"
+ puts " Size: #{p.size}"
+ puts " Vendor: #{p.vendor}"
+ puts " Buildtime: #{p.buildtime}"
+
+ d = p.dep(Dep.PROVIDES)
+ # puts d.class
+ d.each do | x |
+ # puts x.class
+ puts " Provides: #{x.to_s}"
+ end
+
+ puts
+
end