Class: Nanoc3::Extra::VCS

Nanoc3::Extra::VCS is a very simple representation of a version control system that abstracts the add, remove and move operations. It does not commit. This class is primarily used by data sources that store data as flat files on the disk.

This is the abstract superclass for all VCSes. Subclasses should implement the indicated methods.

Constants Inherited from Nanoc3::Plugin

MAP

Public Visibility

Public Class Method Summary

identifier(identifier)

Sets the identifier for this VCS.

identifiers(*identifiers)

Sets the identifiers for this VCS.

register(class_or_name, *identifiers)

Registers the given class as a VCS with the given identifier.

Public Class Methods Inherited from Nanoc3::Plugin

all, named

Public Instance Method Summary

#add(filename)

Adds the file with the given filename to the working copy.

#move(src, dst)

Moves the file with the given filename to a new location.

#remove(filename)

Removes the file with the given filename from the working copy.

Public Class Method Details

identifier

public identifier(identifier)

Sets the identifier for this VCS.

[View source]


20
21
22
# File 'lib/nanoc3/extra/vcs.rb', line 20

def self.identifier(identifier)
  Nanoc3::Extra::VCS.register(self, identifier)
end

identifiers

public identifiers(*identifiers)

Sets the identifiers for this VCS.

[View source]


15
16
17
# File 'lib/nanoc3/extra/vcs.rb', line 15

def self.identifiers(*identifiers)
  Nanoc3::Extra::VCS.register(self, *identifiers)
end

register

public register(class_or_name, *identifiers)

Registers the given class as a VCS with the given identifier.

[View source]


25
26
27
# File 'lib/nanoc3/extra/vcs.rb', line 25

def self.register(class_or_name, *identifiers)
  Nanoc3::Plugin.register(Nanoc3::Extra::VCS, class_or_name, *identifiers)
end

Public Instance Method Details

add

public add(filename)

Adds the file with the given filename to the working copy.

Subclasses must implement this method.

[View source]


32
33
34
# File 'lib/nanoc3/extra/vcs.rb', line 32

def add(filename)
  not_implemented('add')
end

move

public move(src, dst)

Moves the file with the given filename to a new location. When this method is executed, the original file should no longer be present on the disk.

Subclasses must implement this method.

[View source]


50
51
52
# File 'lib/nanoc3/extra/vcs.rb', line 50

def move(src, dst)
  not_implemented('move')
end

remove

public remove(filename)

Removes the file with the given filename from the working copy. When this method is executed, the file should no longer be present on the disk.

Subclasses must implement this method.

[View source]


41
42
43
# File 'lib/nanoc3/extra/vcs.rb', line 41

def remove(filename)
  not_implemented('remove')
end
Generated on Sunday, August 09 2009 at 01:43:15 PM by YARD 0.2.3.2 (ruby-1.8.7).