Module: Sevgi::Standard::Model::SpecialFeSpecularLighting
- Defined in:
- lib/sevgi/standard/model.rb
Instance Method Summary collapse
-
#apply(cdata:, elements:) ⇒ Object
Exactly one FilterLightSource element first and any number of Descriptive elements in any order.
Instance Method Details
#apply(cdata:, elements:) ⇒ Object
Exactly one FilterLightSource element first and any number of Descriptive elements in any order.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/sevgi/standard/model.rb', line 53 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 unless (unallowed = Element.unpick(elements[1..], :Descriptive)).empty? UnallowedElementsError.(element, unallowed) unless unallowed.empty? end end |