From 847ac203f9c0b5fce299e87a63b0de5d3ef416f6 Mon Sep 17 00:00:00 2001 From: Nick Lewis Date: Tue, 22 Mar 2011 16:44:01 -0700 Subject: maint: Implement an InterfaceCollection class to manage interfaces Having an instance variable on class Interface is insufficient for Interface::Indirector. This also changes the semantics of "Interface.interface" to handle registration and loading actions, and for "Interface.new" to only instantiate an Interface. Thus, consumers of the API should typically use "Interface.interface", unless they have reasons to not want an interface automatically registered. Paired-With: Pieter van de Bruggen --- lib/puppet/application/interface_base.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/puppet/application/interface_base.rb') diff --git a/lib/puppet/application/interface_base.rb b/lib/puppet/application/interface_base.rb index 654674df5..7a31ce323 100644 --- a/lib/puppet/application/interface_base.rb +++ b/lib/puppet/application/interface_base.rb @@ -1,4 +1,5 @@ require 'puppet/application' +require 'puppet/interface' class Puppet::Application::InterfaceBase < Puppet::Application should_parse_config @@ -40,11 +41,6 @@ class Puppet::Application::InterfaceBase < Puppet::Application @exit_code || 0 end - def initialize(*args) - require 'puppet/interface' - super - end - def main # Call the method associated with the provided action (e.g., 'find'). if result = interface.send(verb, *arguments) -- cgit