Method: Transit::Marshaler::Base#find_handler

Defined in:
lib/transit/marshaler/base.rb

#find_handler(obj) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



66
67
68
69
70
71
72
73
# File 'lib/transit/marshaler/base.rb', line 66

def find_handler(obj)
  obj.class.ancestors.each do |a|
    if handler = @handlers[a]
      return handler
    end
  end
  nil
end