method
inspect
inspect()
public
Hide source
# File activesupport/lib/active_support/duration.rb, line 444 def inspect # :nodoc: return "#{value} seconds" if @parts.empty? @parts. sort_by { |unit, _ | PARTS.index(unit) }. map { |unit, val| "#{val} #{val == 1 ? unit.to_s.chop : unit.to_s}" }. to_sentence(locale: false) end