135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
# File 'lib/flvtool2.rb', line 135
def self.validate_options( options )
if options[:commands].empty?
show_usage
exit 0
end
options[:commands].each do |command|
case command
when :print
if options[:out_pipe]
throw_error "Could not use print command in conjunction with output piping or redirection"
exit 1
end
when :debug
if options[:out_pipe]
throw_error "Could not use debug command in conjunction with output piping or redirection"
exit 1
end
when :help
show_usage
exit 0
when :version
show_version
exit 0
end
end
options
end
|