Sha256: db06cee0a04dda4c3b32ee44771b16c1131116f9541067a92302a00f2c1d8f79
Contents?: true
Size: 370 Bytes
Versions: 1
Compression:
Stored size: 370 Bytes
Contents
class Class def inferred_type() klass_name = self.name.split("::").last parent_klass = self.superclass while(parent_klass != nil) check = parent_klass.name.split("::").last if (klass_name.end_with?(check)) return klass_name.gsub(/#{check}\z/, "") end parent_klass = parent_klass.superclass end return nil end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
typecollection-0.0.2 | lib/typecollection/class+inferred_type.rb |