Class: Superform::Node
- Inherits:
-
Object
- Object
- Superform::Node
- Defined in:
- lib/superform.rb
Overview
Superclass for Namespace and Field classes. Not much to it other than it has a ‘name` and `parent` node attribute. Think of it as a tree.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(key, parent:) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(key, parent:) ⇒ Node
Returns a new instance of Node.
67 68 69 70 |
# File 'lib/superform.rb', line 67 def initialize(key, parent:) @key = key @parent = parent end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
65 66 67 |
# File 'lib/superform.rb', line 65 def key @key end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
65 66 67 |
# File 'lib/superform.rb', line 65 def parent @parent end |