Class: Hashira::Duplication::Index
- Inherits:
-
Object
- Object
- Hashira::Duplication::Index
- Defined in:
- lib/hashira/duplication/index.rb
Constant Summary collapse
- RARE =
2- MAX_BUCKET =
60
Instance Method Summary collapse
- #buckets ⇒ Object
-
#initialize(fragments) ⇒ Index
constructor
A new instance of Index.
Constructor Details
#initialize(fragments) ⇒ Index
Returns a new instance of Index.
7 8 9 10 |
# File 'lib/hashira/duplication/index.rb', line 7 def initialize(fragments) @fragments = fragments @frequency = frequencies(fragments) end |
Instance Method Details
#buckets ⇒ Object
12 |
# File 'lib/hashira/duplication/index.rb', line 12 def buckets = grouped.values.select { |bucket| bucket.size.between?(2, MAX_BUCKET) } |