X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/ca091d07cdf75c8637229b11c5bafdeaa79bb8a2..9d982cb5d7f9abe598c8df3eefabe10501056110:/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