#!/usr/bin/env ruby # frozen_string_literal: true 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