title: Ruby: method to print and neat an array
body: <p>I am not sure if this question is too silly but I haven't found a way to do it.</p>
  
  <p>Usually to puts an array in a loop I do this</p>
  
  <pre><code>current_humans = [.....]
  current_humans.each do |characteristic|
    puts characteristic
  end
  </code></pre>
  
  <p>However if I have this:</p>
  
  <pre><code>class Human
    attr_accessor:name,:country,:sex
    @@current_humans = []
  
    def self.current_humans
      @@current_humans
    end
  
    def self.print    
      #@@current_humans.each do |characteristic|
      #  puts characteristic
      #end
      return @@current_humans.to_s    
    end
  
    def initialize(name='',country='',sex='')
      @name    = name
      @country = country
      @sex     = sex
  
      @@current_humans &lt;&lt; self #everytime it is save or initialize it save all the data into an array
      puts "A new human has been instantiated"
    end       
  end
  
  jhon = Human.new('Jhon','American','M')
  mary = Human.new('Mary','German','F')
  puts Human.print
  </code></pre>
  
  <p>It doesn't work.</p>
  
  <p>Of course I can use something like this</p>
  
  <pre><code>puts Human.current_humans.inspect
  </code></pre>
  
  <p>but I want to learn other alternatives!</p>