AwesomePrint::Ripple

Public Class Methods

included(base) click to toggle source
# File lib/awesome_print/ext/ripple.rb, line 9
def self.included(base)
  base.send :alias_method, :cast_without_ripple, :cast
  base.send :alias_method, :cast, :cast_with_ripple
end

Public Instance Methods

cast_with_ripple(object, type) click to toggle source

Add Ripple class names to the dispatcher pipeline.

# File lib/awesome_print/ext/ripple.rb, line 16
def cast_with_ripple(object, type)
  cast = cast_without_ripple(object, type)
  return cast if !defined?(::Ripple)

  if object.is_a?(::Ripple::AttributeMethods) # Module used to access attributes across documents and embedded documents
    cast = :ripple_document_instance
  elsif object.is_a?(::Ripple::Properties)    # Used to access property metadata on Ripple classes
    cast = :ripple_document_class
  end
  cast
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.