Sha256: c2dce9abf3a2a3b4ab8d04c688814ba719d118717181e7a8d70b29270ecfee7a

Contents?: true

Size: 377 Bytes

Versions: 3

Compression:

Stored size: 377 Bytes

Contents

module GitWrapper
  module Commands
    class Commit < Git

      def message(message)
        @message = message
        self
      end

      def author(name, email)
        @author = "#{name} <#{email}>"
        self
      end

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