Module: SimpleCov::HashMergeHelper

### Home Classes Methods

### In Files

- lib/simplecov/merge_helpers.rb

### Methods

- #merge_resultset

### Class/Module Index

Quicksearch

- SimpleCov
- SimpleCov::ArrayFilter
- SimpleCov::ArrayMergeHelper
- SimpleCov::BlockFilter
- SimpleCov::CommandGuesser
- SimpleCov::Configuration
- SimpleCov::ExitCodes
- SimpleCov::FileList
- SimpleCov::Filter
- SimpleCov::Formatter
- SimpleCov::Formatter::MultiFormatter
- SimpleCov::Formatter::SimpleFormatter
- SimpleCov::HashMergeHelper
- SimpleCov::LastRun
- SimpleCov::Profiles
- SimpleCov::Railtie
- SimpleCov::Result
- SimpleCov::ResultMerger
- SimpleCov::SourceFile
- SimpleCov::SourceFile::Line
- SimpleCov::StringFilter
- SimpleCov::VERSION
- Coverage

No matching classes.

# SimpleCov::HashMergeHelper

### Public Instance Methods

merge_resultset(hash) click to toggle source

Merges the given Coverage.result hash with self

    # File lib/simplecov/merge_helpers.rb, line 23
    def merge_resultset(hash)
      new_resultset = {}
      (keys + hash.keys).each do |filename|
        new_resultset[filename] = []
      end

      new_resultset.each_key do |filename|
        new_resultset[filename] = (self[filename] || []).merge_resultset(hash[filename] || [])
      end
      new_resultset
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.