Sha256: 8279ae4210441a2af6a3c157e6546b38d44a09e5cde7aad87640a0b2e2bf14c5

Contents?: true

Size: 145 Bytes

Versions: 1

Compression:

Stored size: 145 Bytes

Contents

class Hash

  def to_ff
    self.inject({}) do |ff, pair|
      ff[pair.last] = ff[pair.last] ? ff[pair.last] + 1 : 1
      ff
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
SEstimator-0.1.0 lib/SEstimator/support/hash.rb