module AwesomePrint::Node

Public Class Methods

included(base) click to toggle source
# File lib/biosphere/node.rb, line 86
def self.included(base)
    base.send :alias_method, :cast_without_node, :cast
    base.send :alias_method, :cast, :cast_with_node
end

Public Instance Methods

awesome_node_instance(object) click to toggle source
# File lib/biosphere/node.rb, line 99
def awesome_node_instance(object)
    "#{object.class} #{awesome_hash(object.data)}"
end
cast_with_node(object, type) click to toggle source
# File lib/biosphere/node.rb, line 91
def cast_with_node(object, type)
    cast = cast_without_node(object, type)
    if (defined?(::Biosphere::Node)) && (object.is_a?(::Biosphere::Node))
        cast = :node_instance
    end
    cast
end