def print_posts(posts)
      table do |t|
        t.headings = headings
        posts.each_with_index do |post,i|
          t << [
                { :value => i+1, :alignment => :right },
                post.service.capitalize,
                { :value => post.stars_count, :alignment => :center },
                post.short_name
               ]
        end
      end      
    end
def print_posts(posts)
      table do |t|
        t.headings = headings
        posts.each_with_index do |post,i|
          t << [
                { :value => i+1, :alignment => :right },
                post.service.capitalize,
                { :value => post.stars_count, :alignment => :center },
                post.short_name
               ]
        end
      end      
    end
This does the actual printing of posts.

 posts - an Array of Post objects

 It loops through the Array of posts and sends them to `terminal-table`.