Class: Yearbook::Detection::Collection

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/yearbook/detection/collection.rb

Instance Method Summary collapse

Constructor Details

#initialize(cvseq, opts = {}) ⇒ Collection

Returns a new instance of Collection.



6
7
8
9
10
# File 'lib/yearbook/detection/collection.rb', line 6

def initialize(cvseq, opts={})
  @cv_seq = cvseq

  super(@cv_seq)
end

Instance Method Details

#bestObject

returns just one of the CvAvgComps



13
14
15
# File 'lib/yearbook/detection/collection.rb', line 13

def best
  sort_by{|c| c.width * c.height}.reverse.first
end