Sha256: d2da39b15e883404a27bde3f407b487ced917c745b0bb1b12a4c5b1678e59866

Contents?: true

Size: 364 Bytes

Versions: 3

Compression:

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

3 entries across 3 versions & 1 rubygems

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