Sha256: 6076f1eb8de50049952f69bf62502900ab24ce7b20f05dc7a62a833cb5264fd4

Contents?: true

Size: 344 Bytes

Versions: 4

Compression:

Stored size: 344 Bytes

Contents

module GitWrapper
  module Commands
    class Checkout < Git

      def commit(commit)
        @commit = commit
        self
      end

      def into(new_branch)
        @new_branch = new_branch
        self
      end

      def command
        "checkout #{@commit} #{@new_branch.nil? ? '' : "-b #{@new_branch}" }"
      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/checkout.rb
git_wrapper-1.1.1 lib/git_wrapper/commands/checkout.rb
git_wrapper-1.1.0 lib/git_wrapper/commands/checkout.rb
git_wrapper-1.0.3 lib/git_wrapper/commands/checkout.rb