Class: CFA::Placer Abstract

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

Overview

This class is abstract.

Subclasses implement different ways where to place the entry by overriding #new_element.

Places a new AugeasElement into an AugeasTree.

Direct Known Subclasses

AfterPlacer, AppendPlacer, BeforePlacer, ReplacePlacer

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; AugeasElement documents its structure.

Parameters:

Returns:

  • (AugeasElement, Hash)

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

Raises:

  • (NotImplementedError)


13
14
15
16
# File 'lib/cfa/placer.rb', line 13

def new_element(_tree)
  raise NotImplementedError,
        "Subclasses of #{Module.nesting.first} must override #{__method__}"
end