Class: CFA::AppendPlacer

Inherits:
Placer
  • Object
show all
Defined in:
lib/cfa/placer.rb

Overview

Places the new element at the end of the tree.

Instance Method Summary collapse

Instance Method Details

#new_element(tree) ⇒ AugeasElement, Hash

Returns the new element; it is empty! Note that the return value is actually a Hash; CFA::AugeasElement documents its structure.

Parameters:

Returns:



25
26
27
28
29
30
# File 'lib/cfa/placer.rb', line 25

def new_element(tree)
  res = create_element
  tree.all_data << res

  res
end