Class: Yearbook::Detection::Collection
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Yearbook::Detection::Collection
- Defined in:
- lib/yearbook/detection/collection.rb
Instance Method Summary collapse
-
#best ⇒ Object
returns just one of the CvAvgComps.
-
#initialize(cvseq, opts = {}) ⇒ Collection
constructor
A new instance of Collection.
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
#best ⇒ Object
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 |