Sha256: 1a18013a2b9dbd29d1d0b063c9a5350141d3a570da4c7ded48bfde0e030a2706

Contents?: true

Size: 953 Bytes

Versions: 1

Compression:

Stored size: 953 Bytes

Contents

module Space
  class Action
    autoload :Handler, 'space/action/handler'
    autoload :Parser,  'space/action/parser'

    autoload :Execute, 'space/action/builtin'
    autoload :Refresh, 'space/action/builtin'
    autoload :Scope,   'space/action/builtin'
    autoload :Unscope, 'space/action/builtin'

    autoload :Local,   'space/action/development'
    autoload :Remote,  'space/action/development'

    attr_reader :project, :scope, :args

    def initialize(project, scope, *args)
      @project = project
      @scope   = scope
      @args    = args
      log "ACTION #{self.class.name.demodulize} (#{scope.map(&:name).inspect})"
    end

    def run
      raise 'not implemented'
    end

    private

      def in_scope
        scope.each { |repo| yield repo }
      end

      def system(cmd)
        puts cmd
        super
      end

      def confirm
        puts "--- hit any key to continue ---\n"
        STDIN.getc
      end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
space-0.0.6 lib/space/action.rb