lib/rwtocore/cli.rb
def run
      slist = []
      @filelist.each do |fname|
        err = Messenger.new(fname, @errs)
        begin
          File.open(fname) do |infile|
            series = case
              when @blocksize == 0 then Series.new(File.basename(fname, '.*'), infile, err)
              when @blocksize < 0 then OuterSeries.new(File.basename(fname, '.*'), infile, err, @blocksize)
              else InnerSeries.new(File.basename(fname, '.*'), infile, err, @blocksize)
              end
            slist.push(series) if series.full_nrings > 0
          end
        rescue => fexcept
          # log the error but don't exit
          err.message "File error #{fexcept.class} #{fexcept.message}"
        end
      end
      drawing = Drawing.new(slist)
      drawing.draw(@outs)
    end
# Run an instance of the application, with the previously defined options.
Run an instance of the application, with the previously defined options.
Run an instance of the application with the previously defined options .
def run
      slist = []
      @filelist.each do |fname|
        err = Messenger.new(fname, @errs)
        begin
          File.open(fname) do |infile|
            series = case
              when @blocksize == 0 then Series.new(File.basename(fname, '.*'), infile, err)
              when @blocksize < 0 then OuterSeries.new(File.basename(fname, '.*'), infile, err, @blocksize)
              else InnerSeries.new(File.basename(fname, '.*'), infile, err, @blocksize)
              end
            slist.push(series) if series.full_nrings > 0
          end
        rescue => fexcept
          err.message "File error #{fexcept.class} #{fexcept.message}"
        end
      end
      drawing = Drawing.new(slist)
      drawing.draw(@outs)
    end
def run slist = [ ] @filelist . each do | fname | err = Messenger . new ( fname , @errs ) begin File . open ( fname ) do | infile | series = case when @blocksize == 0 then Series . new ( File . basename ( fname , '.*' ) , infile , err ) when @blocksize < 0 then OuterSeries . new ( File . basename ( fname , '.*' ) , infile , err , @blocksize ) else InnerSeries . new ( File . basename ( fname , '.*' ) , infile , err , @blocksize ) end slist . push ( series ) if series . full_nrings > 0 end rescue => fexcept err . message "File error #{fexcept.class} #{fexcept.message}" end end drawing = Drawing . new ( slist ) drawing . draw ( @outs ) end
Run an instance of the application, with the previously defined options.
Run an instance of the application with the previously defined options .
# log the error but don't exit