X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/ca091d07cdf75c8637229b11c5bafdeaa79bb8a2..6a086c6afe926f02597b81b21b58000166b2c885:/lib/nos_oignons/git.rb diff --git a/lib/nos_oignons/git.rb b/lib/nos_oignons/git.rb index 4a2d04d..53399bd 100644 --- a/lib/nos_oignons/git.rb +++ b/lib/nos_oignons/git.rb @@ -1,9 +1,15 @@ -def handle_modified_files(io) - io.readlines.each do |line| - status, file = line.strip.split("\t", 2) - # Has file been added or modified? - if ['A', 'M'].include?(status) - yield file +module NosOignons + module Git + class << self + def handle_modified_files(io) + io.readlines.each do |line| + status, file = line.strip.split("\t", 2) + # Has file been added or modified? + if ['A', 'M'].include?(status) + yield file + end + end + end end end end