Sha256: 87ff4bdeff644379e492611fdb888305a5e72fb7fa871ddd4f6a5eeeffa0c027
Contents?: true
Size: 695 Bytes
Versions: 13
Compression:
Stored size: 695 Bytes
Contents
module JsDuck module Web # 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 => Web::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 end
Version data entries
13 entries across 13 versions & 1 rubygems