Module: Sevgi::Standard::Model::SpecialFeSpecularLighting 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 the special feSpecularLighting content model.

Instance Method Summary collapse

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.

Parameters:

  • cdata (String, nil)

    character data content

  • elements (Array<Symbol>)

    child element names

Returns:

  • (nil)

Raises:



99
100
101
102
103
104
105
106
107
108
109
# File 'lib/sevgi/standard/model.rb', line 99

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

  unless Element.is?(elements.first, :FilterLightSource)
    UnmetConditionError.(element, "Exactly one FilterLightSource element as first required")
  end

  if !(unallowed = Element.unpick(elements[1..], :Descriptive)).empty? && !unallowed.empty?
    UnallowedElementsError.(element, unallowed)
  end
end