class Hookers::Commands::GitCommit

Constants

KEYS

Attributes

command[RW]
git[RW]
options[RW]

Public Class Methods

new(command, args) click to toggle source
# File lib/hookers/commands/git_commit.rb, line 21
def initialize(command, args)
  self.options = parse_options(args)
  self.git = Git::Repository.new
end
slop() click to toggle source
# File lib/hookers/commands/git_commit.rb, line 14
def self.slop
  Slop.new(help: true) do
    on :m, "Message to be used on commit", argument: true
    on :id, "Pivotal story id", argument: true
  end
end

Public Instance Methods

run() click to toggle source
# File lib/hookers/commands/git_commit.rb, line 26
def run
  puts git.commit "[#{self.command.upcase} ##{options[:id]}] #{options[:m]}"
end