Sha256: eadf208f4207b7bd4bc9502a8aa8f1cb9e758a5b1b50f9080e7ec238c9ab1ba6

Contents?: true

Size: 979 Bytes

Versions: 2

Compression:

Stored size: 979 Bytes

Contents

module Space
  class App
    class Command
      autoload :Execute, 'space/app/command/builtin'
      autoload :Refresh, 'space/app/command/builtin'
      autoload :Scope,   'space/app/command/builtin'
      autoload :Unscope, 'space/app/command/builtin'

      autoload :Local,   'space/app/command/development'
      autoload :Remote,  'space/app/command/development'

      attr_reader :project, :scope, :args

      def initialize(project, scope, *args)
        @project = project
        @scope   = scope
        @args    = args
      end

      def run
        raise 'not implemented'
      end

      private

        def repos
          @repos ||= project.repos.select_by_names(scope)
        end

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

        def system(cmd)
          puts cmd
          super
        end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
space-0.0.5 lib/space/app/command.rb
space-0.0.4 lib/space/app/command.rb