class SrtShifter::Shifter

Public Class Methods

new(args) click to toggle source
# File lib/srtshifter/shifter.rb, line 4
def initialize(args)
        @arguments = args
        @opts = SrtShifter::Options.new(@arguments)
        @subtitle = SrtShifter::Subtitle.new(@opts.options)
end

Public Instance Methods

execute() click to toggle source
# File lib/srtshifter/shifter.rb, line 10
def execute
        @subtitle.shift if parsed_options? and valid_args?
end

Protected Instance Methods

parsed_options?() click to toggle source
# File lib/srtshifter/shifter.rb, line 15
def parsed_options?
        @opts.parse_options
end
valid_args?() click to toggle source
# File lib/srtshifter/shifter.rb, line 19
def valid_args?
        @opts.validate_args
end