self.explode_path

in lib/between_meals/changes/cookbook.rb [24:39]


      def self.explode_path(path)
        @cookbook_dirs.each do |dir|
          re = %r{^
          debug("[cookbook] Matching #{path} against ^#{re}")
          m = path.match(re)
          next unless m

          info("Cookbook is #{m[1]}")
          return {
            :cookbook_dir => dir,
            :name => m[1],
          }
        end
        nil
      end