class RakeMKV::Titles
Public Class Methods
new(titles)
click to toggle source
# File lib/rakemkv/titles.rb, line 5 def initialize(titles) @titles = titles end
Public Instance Methods
at_id(id)
click to toggle source
Find title by id
# File lib/rakemkv/titles.rb, line 14 def at_id(id) detect { |title| title.id == id } end
each(&block)
click to toggle source
# File lib/rakemkv/titles.rb, line 9 def each(&block) @titles.each(&block) end
longest()
click to toggle source
Get longest title
# File lib/rakemkv/titles.rb, line 19 def longest max { |a, b| a.time <=> b.time } end