Module: Ruflet::Icons
- Defined in:
- lib/ruflet_ui.rb
Defined Under Namespace
Classes: IconGroup
Class Method Summary collapse
Class Method Details
.[](name) ⇒ Object
117 118 119 120 121 122 123 |
# File 'lib/ruflet_ui.rb', line 117 def [](name) key = name.to_s.upcase.to_sym return Ruflet::MaterialIcons.const_get(key) if Ruflet::MaterialIcons.const_defined?(key, false) return Ruflet::CupertinoIcons.const_get(key) if Ruflet::CupertinoIcons.const_defined?(key, false) Ruflet::IconData.new(name.to_s) end |
.const_missing(name) ⇒ Object
107 108 109 110 111 112 113 114 115 |
# File 'lib/ruflet_ui.rb', line 107 def const_missing(name) resolved = Ruflet::MaterialIcons.resolve_constant(name) return resolved unless resolved.nil? resolved = Ruflet::CupertinoIcons.resolve_constant(name) return resolved unless resolved.nil? super end |
.cupertino ⇒ Object
103 104 105 |
# File 'lib/ruflet_ui.rb', line 103 def cupertino @cupertino ||= IconGroup.new(Ruflet::CupertinoIcons) end |
.material ⇒ Object
99 100 101 |
# File 'lib/ruflet_ui.rb', line 99 def material @material ||= IconGroup.new(Ruflet::MaterialIcons) end |