Module: Sevgi::Standard::Model::SomeElements Private
- Defined in:
- lib/sevgi/standard/model.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Validates elements that allow selected child elements but no character data.
Instance Method Summary collapse
-
#apply(cdata:, elements:) ⇒ nil
private
Applies this content model.
Instance Method Details
#apply(cdata:, elements:) ⇒ nil
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Applies this content model.
60 61 62 63 64 65 |
# File 'lib/sevgi/standard/model.rb', line 60 def apply(cdata:, elements:) UnallowedCDataError.(element, cdata) if cdata unallowed = elements - spec[:elements] UnallowedElementsError.(element, unallowed) unless unallowed.empty? end |