Sha256: aa085679b73b11d437c493a2c6301ca3345bcc494ddfee42ff535d1b0df9be73
Contents?: true
Size: 776 Bytes
Versions: 4
Compression:
Stored size: 776 Bytes
Contents
# frozen_string_literal: true module Phlexi module Field module Structure # Superclass for Namespace and Field classes. Represents a node in the field tree structure. # # @attr_reader [Symbol] key The node's key # @attr_reader [Node, nil] parent The node's parent in the tree structure class Node attr_reader :key, :parent # Initializes a new Node instance. # # @param key [Symbol, String] The key for the node # @param parent [Node, nil] The parent node def initialize(key, parent:) @key = :"#{key}" @parent = parent end def inspect "<#{self.class.name} key=#{key.inspect} parent=#{parent.inspect} />" end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems