class AST::Node
def updated(type=nil, children=nil, properties=nil)
-
(AST::Node)
-
Parameters:
-
properties
(Hash, nil
) -- -
children
(Array, nil
) -- -
type
(Symbol, nil
) --
def updated(type=nil, children=nil, properties=nil) new_type = type || @type new_children = children || @children new_properties = properties || {} if @type == new_type && @children == new_children && properties.nil? self else copy = original_dup copy.send :initialize, new_type, new_children, new_properties copy end end