Method: XMLMunger::ListHeuristics#common_type
- Defined in:
- lib/xmlmunger/list_heuristics.rb
#common_type(of = nil) ⇒ Object
24 25 26 27 28 |
# File 'lib/xmlmunger/list_heuristics.rb', line 24 def common_type(of = nil) @common_types ||= {} of ||= @list @common_types[of] ||= of.map{|x|x.class.ancestors}.reduce(:&).first end |