diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-03-22 16:44:01 -0700 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-03-22 17:18:51 -0700 |
| commit | 847ac203f9c0b5fce299e87a63b0de5d3ef416f6 (patch) | |
| tree | 1177637a9ae75527b14523d3803c610601e5d54b /lib/puppet/application/interface_base.rb | |
| parent | 01ce91816fe061267e9821c07fefb8aa14af4a14 (diff) | |
| download | puppet-847ac203f9c0b5fce299e87a63b0de5d3ef416f6.tar.gz puppet-847ac203f9c0b5fce299e87a63b0de5d3ef416f6.tar.xz puppet-847ac203f9c0b5fce299e87a63b0de5d3ef416f6.zip | |
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
Diffstat (limited to 'lib/puppet/application/interface_base.rb')
| -rw-r--r-- | lib/puppet/application/interface_base.rb | 6 |
1 files changed, 1 insertions, 5 deletions
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) |
