public
Description: Piston is a utility that eases vendor branch management. This repository is a complete reimplementation of Piston to provide different backends, depending on the repositories and working copies you pistonize from.
Homepage: http://piston.rubyforge.org/
Clone URL: git://github.com/francois/piston.git
commit  f072ac8ebaaff7803e10c7b0d77475cd1fd5875a
tree    39bb112382f104ba658fdfe6af0f850a4c86ecd1
parent  02a591a67bc50e748ef1dad08674f579b75c2565
piston / lib / piston / commands / base.rb
100644 35 lines (28 sloc) 0.56 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
module Piston
  module Commands
    class Base
      class << self
        def logger
          @@logger ||= Log4r::Logger["main"]
        end
      end
 
      attr_reader :options
 
      def initialize(options={})
        @options = options
        logger.debug {"#{self.class.name} with options #{options.inspect}"}
      end
 
      def verbose
        @options[:verbose]
      end
 
      def force
        @options[:force]
      end
 
      def quiet
        @options[:quiet]
      end
 
      def logger
        self.class.logger
      end
    end
  end
end