Class: Copland::Configuration::YAML::InterceptorProcessor

Inherits:
Object
  • Object
show all
Includes:
TypeValidator
Defined in:
lib/copland/configuration/yaml/interceptor.rb

Overview

Manages the processing of ‘interceptor’ elements from the parsed YAML stream.

Instance Method Summary collapse

Methods included from TypeValidator

#ensure_element_type, #validate_elements

Instance Method Details

#process(point, definition) ⇒ Object

Processes the given definition (which must be a Hash), and adds the definition as a pending interceptor to the given service point (see ServicePoint#add_pending_interceptor).



49
50
51
52
53
54
55
56
57
# File 'lib/copland/configuration/yaml/interceptor.rb', line 49

def process( point, definition )
  ensure_element_type "interceptor", definition, Hash

  unless definition[ "service" ]
    raise ParserError, "missing element: service"
  end

  point.add_pending_interceptor definition
end