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.
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/sevgi/standard/model.rb', line 57 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 |