#!/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 method access' printf "\tConfig: type = conpact [default]\n" hd = HumanDuration.new test_value.each do |x| printf "\t\t%s\n", hd.humanize(x) end printf "\tConfig: type = short\n" hd = HumanDuration.new('type' => 'short') test_value.each do |x| printf "\t\t%s\n", hd.humanize(x) end puts "\tConfig: type = full" hd = HumanDuration.new('type' => 'full') test_value.each do |x| printf "\t\t%s\n", hd.humanize(x) end puts 'Static method access' printf "\tConfig: type = conpact [default]\n" test_value.each do |x| printf "\t\t%s\n", HumanDurationStatic.humanize(x) end printf "\tConfig: type = short\n" test_value.each do |x| printf "\t\t%s\n", HumanDurationStatic.humanize(x) end puts "\tConfig: type = full" test_value.each do |x| printf "\t\t%s\n", HumanDurationStatic.humanize(x) end puts 'Direct method access' printf "\tConfig: type = conpact [default]\n" test_value.each do |x| printf "\t\t%s\n", humanize(x) end printf "\tConfig: type = short\n" test_value.each do |x| printf "\t\t%s\n", humanize(x) end puts "\tConfig: type = full" test_value.each do |x| printf "\t\t%s\n", humanize(x) end