initialize

in lib/between_meals/changes/cookbook.rb [97:126]


      def initialize(files, cookbook_dirs)
        @files = files
        @cookbook_dirs = cookbook_dirs
        @name = self.class.explode_path(files.sample[:path])[:name]
        
        
        
        
        
        if files.
           select { |x| x[:status] == :deleted }.
           map do |x|
             x[:path].match(
               %{^(
             )
           end.
           compact.
           any? &&
           files.reject { |x| x[:status] == :deleted }.
           map do |x|
             x[:path].match(
               %{^(
             )
           end.none?
          @status = :deleted
        else
          @status = :modified
        end
      end