Module: Sevgi::Standard::Model::SomeElements

Defined in:
lib/sevgi/standard/model.rb

Instance Method Summary collapse

Instance Method Details

#apply(cdata:, elements:) ⇒ Object



28
29
30
31
32
33
# File 'lib/sevgi/standard/model.rb', line 28

def apply(cdata:, elements:)
  UnallowedCDataError.(element, cdata) if cdata

  unallowed = elements - spec[:elements]
  UnallowedElementsError.(element, unallowed) unless unallowed.empty?
end