Class: Odin::Serialization::Stringify::PathNode

Inherits:
Struct
  • Object
show all
Defined in:
lib/odin/serialization/stringify.rb

Overview

Lightweight node for path tree — much cheaper than Hash

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, full_path) ⇒ PathNode

Returns a new instance of PathNode.



9
10
11
# File 'lib/odin/serialization/stringify.rb', line 9

def initialize(name, full_path)
  super(name, full_path, {}, nil, nil, nil, false, -1)
end

Instance Attribute Details

#array_indicesObject

Returns the value of attribute array_indices

Returns:

  • (Object)

    the current value of array_indices



7
8
9
# File 'lib/odin/serialization/stringify.rb', line 7

def array_indices
  @array_indices
end

#childrenObject

Returns the value of attribute children

Returns:

  • (Object)

    the current value of children



7
8
9
# File 'lib/odin/serialization/stringify.rb', line 7

def children
  @children
end

#full_pathObject

Returns the value of attribute full_path

Returns:

  • (Object)

    the current value of full_path



7
8
9
# File 'lib/odin/serialization/stringify.rb', line 7

def full_path
  @full_path
end

#has_arrayObject

Returns the value of attribute has_array

Returns:

  • (Object)

    the current value of has_array



7
8
9
# File 'lib/odin/serialization/stringify.rb', line 7

def has_array
  @has_array
end

#leaf_countObject

Returns the value of attribute leaf_count

Returns:

  • (Object)

    the current value of leaf_count



7
8
9
# File 'lib/odin/serialization/stringify.rb', line 7

def leaf_count
  @leaf_count
end

#modifiersObject

Returns the value of attribute modifiers

Returns:

  • (Object)

    the current value of modifiers



7
8
9
# File 'lib/odin/serialization/stringify.rb', line 7

def modifiers
  @modifiers
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



7
8
9
# File 'lib/odin/serialization/stringify.rb', line 7

def name
  @name
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



7
8
9
# File 'lib/odin/serialization/stringify.rb', line 7

def value
  @value
end