seconds_to_hhmmss 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/seconds_to_hhmmss.rb +10 -0
  3. metadata +44 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c4bebc19747ab7999f16c9baf14a0405f56daeec
4
+ data.tar.gz: 0ad4b683649d5b535c1a00e9a02981dd7ba7aac4
5
+ SHA512:
6
+ metadata.gz: 054df330a43400599f51db9b11d9112089b2b4ac19969e5e2d074740f880d4e4f538a45bf2cafa11b75507e888a6187a0c2ba54543c1232693f7249b428794ec
7
+ data.tar.gz: 48246e57cc5fc6f2c81079d9fc41e90b44e200464aea31a373699a142e20f826b61e66434d08057901f6f2af88cacdd3e331d4c8b5e550c80f2dcd9e1e774e1c
@@ -0,0 +1,10 @@
1
+ class SecondsToHhmmss
2
+ def self.format(seconds)
3
+ hours = seconds / 3600
4
+ minutes = (seconds / 60) % 60
5
+ seconds = seconds % 60
6
+ [hours, minutes, seconds].map do |item|
7
+ item.to_s.rjust(2,'0')
8
+ end.join(':')
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: seconds_to_hhmmss
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Jen Greatrix
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-08-10 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Simple gem that converts seconds into HH:MM:SS format
14
+ email: jen.greatrix@shopify.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/seconds_to_hhmmss.rb
20
+ homepage: http://rubygems.org/gems/hola
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.5.2.3
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Time formatter
44
+ test_files: []