lib/awesome_print/ext/data_mapper.rb
# Add DataMapper class names to the dispatcher pipeline.
#------------------------------------------------------------------------------
Add DataMapper class names to the dispatcher pipeline.
Add DataMapper class names to the dispatcher pipeline .
def cast_with_data_mapper(object, type)
      cast = cast_without_data_mapper(object, type)
      return cast if !defined?(::DataMapper)
      if object.is_a?(::DataMapper::Resource)
        cast = :data_mapper_instance
      elsif object.is_a?(Class) && object.ancestors.include?(::DataMapper::Resource)
        cast = :data_mapper_class
      end
      cast
    end
def cast_with_data_mapper ( object , type ) cast = cast_without_data_mapper ( object , type ) return cast if ! defined? ( :: DataMapper ) if object . is_a? ( :: DataMapper :: Resource ) cast = :data_mapper_instance elsif object . is_a? ( Class ) && object . ancestors . include? ( :: DataMapper :: Resource ) cast = :data_mapper_class end cast end
Add DataMapper class names to the dispatcher pipeline.
Add DataMapper class names to the dispatcher pipeline .
object
type