class Optimist::IOOption
in the case of file-paths given to it.
Note that this will return the file-handle, not the file-name
Option class for handling IO objects and URLs.
def parse(paramlist, _neg_given)
def parse(paramlist, _neg_given) paramlist.map do |pg| pg.map do |param| if param =~ /^(stdin|-)$/i $stdin else require 'open-uri' begin open param rescue SystemCallError => e raise CommandlineError, "file or url for option '#{self.name}' cannot be opened: #{e.message}" end end end end end
def type_format ; "=<filename/uri>" ; end
def type_format ; "=<filename/uri>" ; end