Sha256: d5f7ddaa9714286cff20ccb7e7d528434390c1a6ee97cc45a30ea6af9219bba0

Contents?: true

Size: 516 Bytes

Versions: 3

Compression:

Stored size: 516 Bytes

Contents

module GitWrapper
  module Commands
    class Reset < Git

      def commit(commit)
        @commit = commit
        self
      end

      def soft
        @mode = :soft
        self
      end

      def hard
        @mode = :hard
        self
      end

      def merge
        @mode = :merge
        self
      end

      def keep
        @mode = :keep
        self
      end

      def command
        "reset #{@mode ? "--#{@mode}" : ''} #{@commit}"
      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/reset.rb
git_wrapper-1.0.1 lib/git_wrapper/commands/reset.rb
git_wrapper-1.0.0 lib/git_wrapper/commands/reset.rb