Class: Lolcommits::Plugin::Tranzlate

Inherits:
Base
  • Object
show all
Extended by:
Lolspeak
Defined in:
lib/lolcommits/plugin/tranzlate.rb

Constant Summary

Constants included from Lolspeak

Lolspeak::LOL_DICTIONARY

Instance Attribute Summary

Attributes inherited from Base

#options, #runner

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Lolspeak

tranzlate

Methods inherited from Base

#configuration, #configure_options!, #configured?, #debug, #enabled?, #execute_postcapture, #execute_precapture, #initialize, #log_error, #parse_user_input, #puts, #run_postcapture, #valid_configuration?

Constructor Details

This class inherits a constructor from Lolcommits::Plugin::Base

Class Method Details

.nameObject



104
105
106
# File 'lib/lolcommits/plugin/tranzlate.rb', line 104

def self.name
  'tranzlate'
end

.runner_orderObject



108
109
110
# File 'lib/lolcommits/plugin/tranzlate.rb', line 108

def self.runner_order
  :precapture
end

Instance Method Details

#run_precaptureObject



98
99
100
101
102
# File 'lib/lolcommits/plugin/tranzlate.rb', line 98

def run_precapture
  debug "Commit message before: #{runner.message}"
  runner.message = self.class.tranzlate(runner.message)
  debug "Commit message after: #{runner.message}"
end