Class: SrtShifter::Shifter

Inherits:
Object
  • Object
show all
Defined in:
lib/srtshifter/shifter.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Shifter

Returns a new instance of Shifter.



4
5
6
7
8
# File 'lib/srtshifter/shifter.rb', line 4

def initialize(args)
	@arguments = args
	@opts = SrtShifter::Options.new(@arguments)
	@subtitle = SrtShifter::Subtitle.new(@opts.options)
end

Instance Method Details

#executeObject



10
11
12
# File 'lib/srtshifter/shifter.rb', line 10

def execute
	@subtitle.shift if parsed_options? and valid_args?
end