X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/ca091d07cdf75c8637229b11c5bafdeaa79bb8a2..61077092ef62b9f0780c2dce7ef249be0ce4c7e7:/lib/nos_oignons/git.rb?ds=sidebyside 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