Sha256: 2650c7739464df232598f4ff5e55d039eab37581ef0d4c574c9ea188005713f3

Contents?: true

Size: 295 Bytes

Versions: 4

Compression:

Stored size: 295 Bytes

Contents

require 'straight_line/common/command'

module GitCommands
  # Commit
  class Commit < Command
    def initialize(title, body = '')
      super 'git'
      arg 'commit -a'
      arg %(-m "#{title}") unless title.empty?
      arg %(-m "#{body}") unless body.nil? || body.empty?
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
straight_line-0.1.4.0 lib/straight_line/common/git_commands/commit.rb
straight_line-0.1.3.0 lib/straight_line/common/git_commands/commit.rb
straight_line-0.1.2.0 lib/straight_line/common/git_commands/commit.rb
straight_line-0.1.1.0 lib/straight_line/common/git_commands/commit.rb