Sha256: 9c2673a3f68e533149242d234fb96923aadf08912d46bda7b5ccf8054ffa84a9
Contents?: true
Size: 419 Bytes
Versions: 3
Compression:
Stored size: 419 Bytes
Contents
class Class # removes all the modules from this class name def demodulize self.to_s.gsub(/^.*::/, '') end # indicates whether this type has a CLR type in its ancestors def clr_type? !self.to_clr_type.nil? || self.included_modules.any? {|mod| !mod.to_clr_type.nil? } || self.ancestors.reject {|mod| mod == Object }.any? { |mod| !mod.to_clr_type.nil? } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
caricature-0.7.6 | lib/caricature/core_ext/class.rb |
caricature-0.7.5 | lib/caricature/core_ext/class.rb |
caricature-0.7.2 | lib/core_ext/class.rb |