Class: Node
- Inherits:
-
Struct
- Object
- Struct
- Node
- Defined in:
- lib/src/node.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#props ⇒ Object
Returns the value of attribute props.
Instance Method Summary collapse
- #array_of_paths ⇒ Object
- #first_only? ⇒ Boolean
-
#initialize ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize ⇒ Node
Returns a new instance of Node.
4 5 6 7 |
# File 'lib/src/node.rb', line 4 def initialize(*) super self.path ||= "" end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path
3 4 5 |
# File 'lib/src/node.rb', line 3 def path @path end |
#props ⇒ Object
Returns the value of attribute props
3 4 5 |
# File 'lib/src/node.rb', line 3 def props @props end |
Instance Method Details
#array_of_paths ⇒ Object
15 16 17 |
# File 'lib/src/node.rb', line 15 def array_of_paths array_paths(props[:array_of]) end |
#first_only? ⇒ Boolean
9 10 11 12 13 |
# File 'lib/src/node.rb', line 9 def first_only? return unless props.is_a? Hash props[:array_presence] == "first_only" end |