Method: Spider::Model.simplify_type
- Defined in:
- lib/spiderfw/model/model.rb
.simplify_type(klass) ⇒ Class
An iteration in the search for base type.
61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/spiderfw/model/model.rb', line 61 def self.simplify_type(klass) map_types = { } return klass if base_types.include?(klass) return klass if klass <= Spider::Model::BaseModel return t if t = map_types[klass] return klass.maps_to if klass.subclass_of?(Spider::DataType) && klass.maps_to return klass.superclass if klass.superclass return nil end |