aboutsummaryrefslogtreecommitdiff
path: root/doc/api/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-06 20:13:49 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-06 20:13:49 +0000
commita9e23d28d8a7e10b265ed9280b94e98317d83977 (patch)
tree97e37bef588c685be0b7a99f915e02d063ca09cf /doc/api/ruby
parent27715dabdd3a71a14a162370200938598911879b (diff)
downloadpaludis-a9e23d28d8a7e10b265ed9280b94e98317d83977.tar.gz
paludis-a9e23d28d8a7e10b265ed9280b94e98317d83977.tar.xz
(ruby) SuppotsInstallActionTest.new -> SupportsActionTest.new(InstallAction)
Diffstat (limited to 'doc/api/ruby')
-rw-r--r--doc/api/ruby/example_action.rb4
-rw-r--r--doc/api/ruby/example_package_id.rb14
2 files changed, 9 insertions, 9 deletions
diff --git a/doc/api/ruby/example_action.rb b/doc/api/ruby/example_action.rb
index f1d754ed2..bd3695aec 100644
--- a/doc/api/ruby/example_action.rb
+++ b/doc/api/ruby/example_action.rb
@@ -22,9 +22,9 @@ ids = env[Selection::AllVersionsSorted.new(Generator::Matches.new(
# For each ID:
ids.each do | id |
- # Do we support a FetchAction? We find out by creating a SupportsFetchActionTest object, and
+ # Do we support a FetchAction? We find out by creating a SupportsActionTest object, and
# querying via the PackageID#supports_action method.
- supports_fetch_action = SupportsFetchActionTest.new
+ supports_fetch_action = SupportsActionTest.new(FetchAction)
if not id.supports_action(supports_fetch_action)
puts "ID #{id} does not support the fetch action."
else
diff --git a/doc/api/ruby/example_package_id.rb b/doc/api/ruby/example_package_id.rb
index 8fa10a991..da841eb6d 100644
--- a/doc/api/ruby/example_package_id.rb
+++ b/doc/api/ruby/example_package_id.rb
@@ -58,13 +58,13 @@ ids.each do | id |
# way of doing this, since it's not something we'd expect to be
# doing.
actions = []
- actions << "install" if id.supports_action(SupportsInstallActionTest.new)
- actions << "installed" if id.supports_action(SupportsInstalledActionTest.new)
- actions << "uninstall" if id.supports_action(SupportsUninstallActionTest.new)
- actions << "pretend" if id.supports_action(SupportsPretendActionTest.new)
- actions << "config" if id.supports_action(SupportsConfigActionTest.new)
- actions << "fetch" if id.supports_action(SupportsFetchActionTest.new)
- actions << "info" if id.supports_action(SupportsInfoActionTest.new)
+ actions << "install" if id.supports_action(SupportsActionTest.new(InstallAction))
+ actions << "installed" if id.supports_action(SupportsActionTest.new(InstalledAction))
+ actions << "uninstall" if id.supports_action(SupportsActionTest.new(UninstallAction))
+ actions << "pretend" if id.supports_action(SupportsActionTest.new(PretendAction))
+ actions << "config" if id.supports_action(SupportsActionTest.new(ConfigAction))
+ actions << "fetch" if id.supports_action(SupportsActionTest.new(FetchAction))
+ actions << "info" if id.supports_action(SupportsActionTest.new(InfoAction))
puts " Actions: ".ljust(40) + actions.join(' ')