aboutsummaryrefslogtreecommitdiff
path: root/doc/api/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-09 13:46:00 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-09 13:46:00 +0000
commit4231af5178d647d8ad932decfcf6a437bec63365 (patch)
treebb0d7168d1aff08b6c087bd1aca0f42f8a33e1ed /doc/api/ruby
parent6cf45c1cfa4bf675095a244693b9dbfd5e08daca (diff)
downloadpaludis-4231af5178d647d8ad932decfcf6a437bec63365.tar.gz
paludis-4231af5178d647d8ad932decfcf6a437bec63365.tar.xz
New easier tree visitors
Diffstat (limited to 'doc/api/ruby')
-rw-r--r--doc/api/ruby/example_environment.rb18
1 files changed, 3 insertions, 15 deletions
diff --git a/doc/api/ruby/example_environment.rb b/doc/api/ruby/example_environment.rb
index ec313c329..100130279 100644
--- a/doc/api/ruby/example_environment.rb
+++ b/doc/api/ruby/example_environment.rb
@@ -26,10 +26,9 @@ env = EnvironmentFactory.instance.create(ExampleCommandLine.instance.environment
# A lot of the Environment members aren't very useful to clients. The mask
# related methods are used by PackageID, and shouldn't usually be called
# directly from clients. The system information and mirror functions are mostly
-# for use by Repository subclasses. The [] operator, for selections, is covered
-# in other examples. That leaves the package database, sets and (currently,
-# although this may well change in the future) use flag queries. The package
-# database has its own examples, so we'll start with sets:
+# for use by Repository subclasses. The [] operator is covered in other
+# examples. That leaves the package database and sets. The package database has
+# its own examples, so we'll start with sets:
world = env.set('world')
if (world)
@@ -39,14 +38,3 @@ else
puts "No world set defined"
end
-# And use flags, for which we need package IDs:
-ids = env[Selection::AllVersionsSorted.new(
- Generator::Matches.new(Paludis::parse_user_package_dep_spec('sys-apps/paludis', env, []), []) |
- Filter::SupportsAction.new(InstalledAction))]
-
-if (ids.length > 0)
- id = ids.last
- print "Use flag 'ruby' for ID '#{id.to_s}' is "
- puts env.query_use('ruby', id) ? 'enabled' : 'disabled'
-end
-