Class: Hashira::Duplication::Index

Inherits:
Object
  • Object
show all
Defined in:
lib/hashira/duplication/index.rb

Constant Summary collapse

RARE =
2
MAX_BUCKET =
60

Instance Method Summary collapse

Constructor Details

#initialize(fragments) ⇒ Index

Returns a new instance of Index.



7
8
9
# File 'lib/hashira/duplication/index.rb', line 7

def initialize(fragments)
  @fragments = fragments
end

Instance Method Details

#bucketsObject



11
# File 'lib/hashira/duplication/index.rb', line 11

def buckets = grouped.values.select { |bucket| bucket.size.between?(2, MAX_BUCKET) }