Sha256: e2140e3811ee2517f99125904fa610721fb80dfb79885d9a6681fad942602888

Contents?: true

Size: 423 Bytes

Versions: 7

Compression:

Stored size: 423 Bytes

Contents

class LoadPathAnalyzer

  def initialize(load_path, loaded_features)
    @load_path       = load_path
    @loaded_features = loaded_features
  end

  def frequencies
    load_paths.inject({}) {|a, v|
      a[v] ||= 0
      a[v] += 1
      a
    }
  end

  private

  def load_paths
    @loaded_features.map {|feature|
      @load_path.detect {|path|
        feature[0, path.length] == path
      }
    }.compact
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
refinerycms-1.0.11 lib/load_path_analyzer.rb
refinerycms-1.0.10 lib/load_path_analyzer.rb
refinerycms-1.0.9 lib/load_path_analyzer.rb
refinerycms-1.0.8 lib/load_path_analyzer.rb
refinerycms-1.0.7 lib/load_path_analyzer.rb
refinerycms-1.0.5 lib/load_path_analyzer.rb
refinerycms-1.0.4 lib/load_path_analyzer.rb