Sha256: 57d77041d180d19a26ec2203aff38cb36943d01103d9cd31917e853a4dc830b9

Contents?: true

Size: 404 Bytes

Versions: 4

Compression:

Stored size: 404 Bytes

Contents

module GitWrapper
  module Commands
    class Push < Git

      def remote(remote)
        @remote = remote
        self
      end

      def branch(branch)
        @branch = branch
        @mode = :branch
        self
      end

      def tags
        @mode = :tags
        self
      end

      def command
        "push #{@remote} #{@mode == :branch ? @branch : '--tags'}"
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
git_wrapper-1.1.2 lib/git_wrapper/commands/push.rb
git_wrapper-1.1.1 lib/git_wrapper/commands/push.rb
git_wrapper-1.1.0 lib/git_wrapper/commands/push.rb
git_wrapper-1.0.3 lib/git_wrapper/commands/push.rb