Sha256: 66d14a896f395c76abd685630d187ef7fa19139ae936192b870125358c53e430

Contents?: true

Size: 430 Bytes

Versions: 3

Compression:

Stored size: 430 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

3 entries across 3 versions & 1 rubygems

Version Path
git_wrapper-1.0.2 lib/git_wrapper/commands/push.rb
git_wrapper-1.0.1 lib/git_wrapper/commands/push.rb
git_wrapper-1.0.0 lib/git_wrapper/commands/push.rb