summaryrefslogtreecommitdiffstats
path: root/lib/puppet/interface/action_builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/interface/action_builder.rb')
-rw-r--r--lib/puppet/interface/action_builder.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/puppet/interface/action_builder.rb b/lib/puppet/interface/action_builder.rb
index e76fb1c6e..e389ea3ea 100644
--- a/lib/puppet/interface/action_builder.rb
+++ b/lib/puppet/interface/action_builder.rb
@@ -18,13 +18,10 @@ class Puppet::Interface::ActionBuilder
end
# Ideally the method we're defining here would be added to the action, and a
- # method on the interface would defer to it
+ # method on the interface would defer to it, but we can't get scope correct,
+ # so we stick with this. --daniel 2011-03-24
def invoke(&block)
raise "Invoke called on an ActionBuilder with no corresponding Action" unless @action
- if @interface.is_a?(Class)
- @interface.define_method(@action.name, &block)
- else
- @interface.meta_def(@action.name, &block)
- end
+ @action.invoke = block
end
end