Sha256: d86025519160aa7811e12a0b9850ce78c023b7728f1f129562b023540fbce542
Contents?: true
Size: 549 Bytes
Versions: 12
Compression:
Stored size: 549 Bytes
Contents
module JsDuck # Creates an array of small hashes documenting name, parent class # and icon of a class. class Icons def create(classes) classes.map do |cls| { :name => cls[:name], :extends => cls[:extends], :private => cls[:private], :icon => icon(cls), } end end def icon(cls) if cls[:singleton] "icon-singleton" elsif cls.inherits_from?("Ext.Component") "icon-component" else "icon-class" end end end end
Version data entries
12 entries across 12 versions & 1 rubygems