Module: DockDriver::Template::Dzen2::ClassMethods
- Defined in:
- lib/dock_driver/template/dzen2.rb
Overview
Methods to add to the including class.
Instance Method Summary collapse
-
#list_icons ⇒ Object
Returns a list of available icon names, derived from the files available in the datadir of this gem.
Instance Method Details
#list_icons ⇒ Object
Returns a list of available icon names, derived from the files available in the datadir of this gem.
140 141 142 143 144 145 |
# File 'lib/dock_driver/template/dzen2.rb', line 140 def list_icons pattern = DockDriver::DATADIR + "icons/gray/*.xpm" return Dir.glob( pattern ).map do |icon| icon[/\w+.xpm/].sub(/.xpm/, '') end.sort.uniq end |