Sha256: 8726c15928548e5b2f867c2096debff300e209be114d7f590c060b985f064f4f
Contents?: true
Size: 452 Bytes
Versions: 1
Compression:
Stored size: 452 Bytes
Contents
require 'pathname' class SmartAss::InputFile attr_reader :file def initialize(file) @file = Pathname.new(file) end def stream IO.read(@file) end def self.types [:mkv, :ass] end def self.from_type(type, file) klass(type).new(file) end def self.klass(kind) case kind when :mkv SmartAss::MKV when :ass SmartAss::InputFile else raise "Unrecognized kind=#{kind}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
smart_ass-0.3.0 | lib/smart_ass/input_file.rb |