Sha256: d751bdd9b79400558e0cdcb475a9fed8466123e8b1527bf3707218a27b575fc7

Contents?: true

Size: 241 Bytes

Versions: 14

Compression:

Stored size: 241 Bytes

Contents

module Lucid
  module Formatter
    module Duration
      # Format a duration in seconds in the Unix time format.
      def format_duration(seconds)
        m, s = seconds.divmod(60)
        "#{m}m#{'%.3f' % s}s"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
lucid-0.5.1 lib/lucid/formatter/duration.rb
lucid-0.4.1 lib/lucid/formatter/duration.rb
lucid-0.4.0 lib/lucid/formatter/duration.rb
lucid-0.3.3 lib/lucid/formatter/duration.rb
lucid-0.3.0 lib/lucid/formatter/duration.rb
lucid-0.2.1 lib/lucid/formatter/duration.rb
lucid-0.2.0 lib/lucid/formatter/duration.rb
lucid-0.1.1 lib/lucid/formatter/duration.rb
lucid-0.1.0 lib/lucid/formatter/duration.rb
lucid-0.0.9 lib/lucid/formatter/duration.rb
lucid-0.0.8 lib/lucid/formatter/duration.rb
lucid-0.0.7 lib/lucid/formatter/duration.rb
lucid-0.0.6 lib/lucid/formatter/duration.rb
lucid-0.0.5 lib/lucid/formatter/duration.rb