Module: Supertitle

Defined in:
lib/supertitle/line.rb,
lib/supertitle/read.rb,
lib/supertitle/write.rb,
lib/supertitle/version.rb

Defined Under Namespace

Modules: Read, Write Classes: Line

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.read(content, type) ⇒ Object



5
6
7
8
# File 'lib/supertitle/read.rb', line 5

def self.read(content, type)
  raise "Sorry, only :srt is supported right now!" unless type == :srt
  Read::Srt.new(content).read
end

.write(supertitle_lines, type) ⇒ Object



4
5
6
7
# File 'lib/supertitle/write.rb', line 4

def self.write(supertitle_lines, type)
  raise "Sorry, only :transcript is supported right now!" unless type == :transcript
  Write::Transcript.new(supertitle_lines).write
end