I would like to loop over a directory of .png icons and add them to a on a standalone page. I would also like to expose the file name of the .png under each one.
In a nutshell, this should become an automated feature to display all icons I'm currently using in my development environment so I can use this standalone page as an icon directory.
I'm very new to Ruby but my question first led to me this article but does not go far enough: Iterate through every file in one directory
My (basic inline HTML), attempt so far:
<ul>
<% Dir.glob('/assets/css/img/png/*.png') do |icon| %>
<li> <%= "#{icon}" %> </li>
<% end %>
</ul>
Any help is hugely appreciated.