Class: Melos::Struct::TreeHashInput
- Defined in:
- lib/melos/struct/structs.rb
Constant Summary collapse
- STRUCT =
[ [:node_type, :uint8], [:leaf_node, :select, ->(ctx){ctx[:node_type] == Melos::Constants::NodeType::LEAF}, :class, Melos::Struct::LeafNodeHashInput], [:parent_node, :select, ->(ctx){ctx[:node_type] == Melos::Constants::NodeType::PARENT}, :class, Melos::Struct::ParentNodeHashInput], ]
Instance Attribute Summary collapse
-
#leaf_node ⇒ Object
readonly
Returns the value of attribute leaf_node.
-
#node_type ⇒ Object
readonly
Returns the value of attribute node_type.
-
#parent_node ⇒ Object
readonly
Returns the value of attribute parent_node.
Method Summary
Methods inherited from Base
#deserialize_select_elem_with_context, #initialize, #raw
Constructor Details
This class inherits a constructor from Melos::Struct::Base
Instance Attribute Details
#leaf_node ⇒ Object (readonly)
Returns the value of attribute leaf_node.
245 246 247 |
# File 'lib/melos/struct/structs.rb', line 245 def leaf_node @leaf_node end |
#node_type ⇒ Object (readonly)
Returns the value of attribute node_type.
245 246 247 |
# File 'lib/melos/struct/structs.rb', line 245 def node_type @node_type end |
#parent_node ⇒ Object (readonly)
Returns the value of attribute parent_node.
245 246 247 |
# File 'lib/melos/struct/structs.rb', line 245 def parent_node @parent_node end |