class FieldMaskParser::Parser::DeepHashNode
Attributes
children[R]
is_leaf[RW]
Public Class Methods
new()
click to toggle source
# File lib/field_mask_parser/parser/deep_hash_node.rb, line 7 def initialize @is_leaf = false @children = {} end
Public Instance Methods
==(other)
click to toggle source
@param [DeepHashNode] other @reutrn [bool]
# File lib/field_mask_parser/parser/deep_hash_node.rb, line 20 def ==(other) is_leaf == other.is_leaf && children == other.children end
push_child(field, n)
click to toggle source
@param [Symbol] field @param [DeepHashNode] n
# File lib/field_mask_parser/parser/deep_hash_node.rb, line 14 def push_child(field, n) @children[field] = n end
to_h()
click to toggle source
# File lib/field_mask_parser/parser/deep_hash_node.rb, line 24 def to_h @children.map do |field, child| [field, child.to_h] end.to_h end