Class: TreeHaver::OrderedSiblingEdge

Inherits:
Struct
  • Object
show all
Defined in:
lib/tree_haver/contracts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#next_sibling_idObject

Returns the value of attribute next_sibling_id

Returns:

  • (Object)

    the current value of next_sibling_id



248
249
250
# File 'lib/tree_haver/contracts.rb', line 248

def next_sibling_id
  @next_sibling_id
end

#node_idObject

Returns the value of attribute node_id

Returns:

  • (Object)

    the current value of node_id



248
249
250
# File 'lib/tree_haver/contracts.rb', line 248

def node_id
  @node_id
end

#parent_idObject

Returns the value of attribute parent_id

Returns:

  • (Object)

    the current value of parent_id



248
249
250
# File 'lib/tree_haver/contracts.rb', line 248

def parent_id
  @parent_id
end

#previous_sibling_idObject

Returns the value of attribute previous_sibling_id

Returns:

  • (Object)

    the current value of previous_sibling_id



248
249
250
# File 'lib/tree_haver/contracts.rb', line 248

def previous_sibling_id
  @previous_sibling_id
end

Instance Method Details

#to_hObject



249
250
251
252
253
254
255
256
# File 'lib/tree_haver/contracts.rb', line 249

def to_h
  {
    parent_id: parent_id,
    node_id: node_id,
    previous_sibling_id: previous_sibling_id,
    next_sibling_id: next_sibling_id
  }
end