title: Ruby: combining methods into 1 line
body: <p>I have an array of objects, and I want to take one of the methods to return it into 1 single line.</p>
  
  <p>here is my array</p>
  
  <pre><code>def set
          @seconds = Counter.new('Seconds')
          @minutes = Counter.new('Minutes')
          @hours = Counter.new('Hours')
  
          @time = [@seconds, @minutes, @hours]
      end
  </code></pre>
  
  <p>and here is the method I'm trying to print in the Counter class</p>
  
  <pre><code>    def count
          @counts
      end
  </code></pre>
  
  <p>Here's my attempt </p>
  
  <pre><code>    def read
          reverse = @time.reverse
          @time.each do |t|
              return '%02d' %t.count.to_s.join(":")
          end
      end
  </code></pre>
  
  <p>(I also want them to be in 00, 01 formats, hence the '%02d')</p>
  
  <p>.join doesn't seem to work (I'm guessing it works with arrays but not methods of an array?</p>
  
  <p>any help will be appreciated!</p>