Sha256: 76889e641b66965cb1d57ece3419cdb7b31afa589a0e517e66798f557757ce53
Contents?: true
Size: 1011 Bytes
Versions: 2
Compression:
Stored size: 1011 Bytes
Contents
#!/usr/bin/env ruby require 'human_duration' test_value = [-10, 0, 9, 98, 987, 987_6, 987_65, 987_654, 987_654_3, 987_654_32, 987_654_321] puts 'Class Accessor Method' printf "\tConfig: type = conpact [default]\n" test_value.each do |x| printf "\t\t%s\n", HumanDuration::Duration.human_duration(x) end printf "\tConfig: type = short\n" HumanDuration::Duration.display_type('short') test_value.each do |x| printf "\t\t%s\n", HumanDuration::Duration.human_duration(x) end puts "\tConfig: type = full" HumanDuration::Duration.display_type('full') test_value.each do |x| printf "\t\t%s\n", HumanDuration::Duration.human_duration(x) end puts 'String Accessor Method' printf "\tConfig: type = conpact [default]\n" test_value.each do |x| printf "\t\t%s\n", x.human_duration end printf "\tConfig: type = short\n" test_value.each do |x| printf "\t\t%s\n", x.human_duration('short') end puts "\tConfig: type = full" test_value.each do |x| printf "\t\t%s\n", x.human_duration('full') end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
human_duration-2.0.1 | example/example.rb |
human_duration-2.0.0 | example/example.rb |