Method: Metior.vcs

Defined in:
lib/metior/vcs.rb

.vcs(type) ⇒ VCS

Returns the VCS implementation Module for a given symbolic VCS name

Parameters:

  • type (Symbol)

    The symbolic type name of the VCS

Returns:

  • (VCS)

    The VCS for the given name

[View source]

18
19
20
21
22
23
24
# File 'lib/metior/vcs.rb', line 18

def self.vcs(type)
  type = type.to_sym
  unless @@vcs_types.key? type
    raise 'No VCS registered for :%s' % type
  end
  @@vcs_types[type].init
end