Class: Billy::Util::Scm
- Inherits:
-
Object
- Object
- Billy::Util::Scm
- Defined in:
- lib/billy/util/scm/scm.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.pool ⇒ Object
Returns the value of attribute pool.
Class Method Summary collapse
Class Attribute Details
.pool ⇒ Object
Returns the value of attribute pool.
9 10 11 |
# File 'lib/billy/util/scm/scm.rb', line 9 def pool @pool end |
Class Method Details
.configure!(cap, config) ⇒ Object
20 21 22 23 24 |
# File 'lib/billy/util/scm/scm.rb', line 20 def configure!( cap, config ) scm = ( config.scm || :git ).to_sym raise "#{scm} handler is unknown." if !self.pool.has_key?( scm ) pool[ scm ].configure!( cap, config ) end |
.register_scm(scm) ⇒ Object
15 16 17 18 |
# File 'lib/billy/util/scm/scm.rb', line 15 def register_scm( scm ) key = scm.class.to_s.split( "::" ).last.downcase.to_sym ( self.pool ||= {} )[ key ] = scm end |
.register_self! ⇒ Object
11 12 13 |
# File 'lib/billy/util/scm/scm.rb', line 11 def register_self! Billy::Util::Scm.register_scm( self.new ) end |