Sha256: 64b944109dd8373155f4d6e778719f8f0e32a7eaa7178e8937e04644dd0b2e1d
Contents?: true
Size: 623 Bytes
Versions: 23
Compression:
Stored size: 623 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 => Icons::class_icon(cls), } end end # Returns CSS class name for an icon of class def self.class_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
23 entries across 23 versions & 1 rubygems