Class: Lolcommits::Tranzlate

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

Constant Summary

Constants included from Lolspeak

Lolspeak::LOL_DICTIONARY

Instance Attribute Summary

Attributes inherited from Plugin

#options, #runner

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Lolspeak

tranzlate

Methods inherited from Plugin

#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

Class Method Details

.nameObject



107
108
109
# File 'lib/lolcommits/plugins/tranzlate.rb', line 107

def self.name
  'tranzlate'
end

.runner_orderObject



111
112
113
# File 'lib/lolcommits/plugins/tranzlate.rb', line 111

def self.runner_order
  :precapture
end

Instance Method Details

#run_precaptureObject



101
102
103
104
105
# File 'lib/lolcommits/plugins/tranzlate.rb', line 101

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