Class GenSpecMgr
In: specsaver.rb
Parent: SpecMgr

Generic spec manager class. Provides the base implementation for the list_specs() and spec_file() methods and a shorthand for the update() method

Methods
description    list_specs    new    spec_file    update   
Public Class methods
new( type, root, p4t, p4u )

Constructor. Provide the type of spec ("client", "label" etc.), the client root and tagged and noon-tagged P4 client instances.

# File specsaver.rb, line 251
    def initialize( type, root, p4t, p4u )
	@type = type
	super( root, p4t, p4u )
    end
Public Instance methods
update( since )

Shorthand wrapper around SpecMgr#update()

# File specsaver.rb, line 259
    def update( since )
	super( @type, since )
    end
Protected Instance methods
list_specs()

Generate a list of all specs of the current type. The default implementation just appends an "s" to the type name and uses that as a P4 command. e.g. "p4 clients" etc. etc.

# File specsaver.rb, line 270
    def list_specs
	eval( }@p4t.run_#{@type}s} )
    end
spec_file( spec )

Map a spec type and name to a depot path where this spec will be archived.

# File specsaver.rb, line 278
    def spec_file( spec )
	@root + "/#{@type}s/" + type2name( @type, spec )
    end
description()

Provide a description for changelists and for stdout

# File specsaver.rb, line 285
    def description
	"Archive updated #{@type}s"
    end