Sha256: 6dcfd4a78f5ac1ace498e5b8fe5823e60630c3db1433b88ff927ab5a2f881e02
Contents?: true
Size: 365 Bytes
Versions: 1
Compression:
Stored size: 365 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.match(check)) return klass_name.gsub(check, '') 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.10 | lib/typecollection/class+inferred_type.rb |