Class: Trane::FieldNode
- Inherits:
-
Data
- Object
- Data
- Trane::FieldNode
- Defined in:
- lib/trane/field_node.rb
Instance Attribute Summary collapse
-
#array_of ⇒ Object
readonly
Returns the value of attribute array_of.
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#enum ⇒ Object
readonly
Returns the value of attribute enum.
-
#extra ⇒ Object
readonly
Returns the value of attribute extra.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name:, type: nil, extra: false, format: nil, array_of: nil, required: nil, enum: nil, children: []) ⇒ FieldNode
constructor
A new instance of FieldNode.
Constructor Details
#initialize(name:, type: nil, extra: false, format: nil, array_of: nil, required: nil, enum: nil, children: []) ⇒ FieldNode
Returns a new instance of FieldNode.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/trane/field_node.rb', line 5 def initialize(name:, type: nil, extra: false, format: nil, array_of: nil, required: nil, enum: nil, children: []) super( name: name.to_sym, type: type&.to_sym, extra: extra, format: format&.to_sym, array_of: array_of&.to_sym, required: required, enum: enum&.freeze, children: children.freeze ) end |
Instance Attribute Details
#array_of ⇒ Object (readonly)
Returns the value of attribute array_of
4 5 6 |
# File 'lib/trane/field_node.rb', line 4 def array_of @array_of end |
#children ⇒ Object (readonly)
Returns the value of attribute children
4 5 6 |
# File 'lib/trane/field_node.rb', line 4 def children @children end |
#enum ⇒ Object (readonly)
Returns the value of attribute enum
4 5 6 |
# File 'lib/trane/field_node.rb', line 4 def enum @enum end |
#extra ⇒ Object (readonly)
Returns the value of attribute extra
4 5 6 |
# File 'lib/trane/field_node.rb', line 4 def extra @extra end |
#format ⇒ Object (readonly)
Returns the value of attribute format
4 5 6 |
# File 'lib/trane/field_node.rb', line 4 def format @format end |
#name ⇒ Object (readonly)
Returns the value of attribute name
4 5 6 |
# File 'lib/trane/field_node.rb', line 4 def name @name end |
#required ⇒ Object (readonly)
Returns the value of attribute required
4 5 6 |
# File 'lib/trane/field_node.rb', line 4 def required @required end |
#type ⇒ Object (readonly)
Returns the value of attribute type
4 5 6 |
# File 'lib/trane/field_node.rb', line 4 def type @type end |