Class: Lolcommits::Plugin::Tranzlate

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

Constant Summary

Constants included from Tranzlate::Lolspeak

Tranzlate::Lolspeak::LOL_DICTIONARY

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Tranzlate::Lolspeak

tranzlate

Class Method Details

.nameString

Returns the name of the plugin. Identifies the plugin to lolcommits.


14
15
16
# File 'lib/lolcommits/plugin/tranzlate.rb', line 14

def self.name
  'tranzlate'
end

.runner_orderArray

Returns position(s) of when this plugin should run during the capture process.


23
24
25
# File 'lib/lolcommits/plugin/tranzlate.rb', line 23

def self.runner_order
  [:precapture]
end

Instance Method Details

#run_precaptureObject

Pre-capture hook, runs after lolcommits captures a snapshot.

Translate the commmit message with lolspeak


33
34
35
36
37
# File 'lib/lolcommits/plugin/tranzlate.rb', line 33

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