Sha256: 3f9266ca376d1724f10c1180987c922c14ffe195c63dbbf78075e994455a8201

Contents?: true

Size: 366 Bytes

Versions: 5

Compression:

Stored size: 366 Bytes

Contents

class ProgressBar
  module Components
    class ElapsedTimer
      include Timer

      def to_s
        "Time: #{elapsed_time}"
      end

    private
      def elapsed_time
        return '--:--:--' unless started?

        hours, minutes, seconds = divide_seconds(elapsed_seconds)

        sprintf TIME_FORMAT, hours, minutes, seconds
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/ruby-progressbar-1.0.2/lib/progress_bar/components/elapsed_timer.rb
ruby-progressbar-1.0.2 lib/progress_bar/components/elapsed_timer.rb
ruby-progressbar-1.0.1 lib/progress_bar/components/elapsed_timer.rb
ruby-progressbar-1.0.0 lib/progress_bar/components/elapsed_timer.rb
ruby-progressbar-1.0.0rc1 lib/progress_bar/components/elapsed_timer.rb