Module: Sevgi::Standard::Model::SpecialFeDiffuseLighting
- Defined in:
- lib/sevgi/standard/model.rb
Instance Method Summary collapse
-
#apply(cdata:, elements:) ⇒ Object
Any number of Descriptive elements and exactly one FilterLightSource element, in any order.
Instance Method Details
#apply(cdata:, elements:) ⇒ Object
Any number of Descriptive elements and exactly one FilterLightSource element, in any order.
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/sevgi/standard/model.rb', line 38 def apply(cdata:, elements:) UnallowedCDataError.(element, cdata) if cdata unless (filter_light_source_elements = Element.pick(elements, :FilterLightSource)).size == 1 UnmetConditionError.(element, "Exactly one FilterLightSource element required") end unless (unallowed = Element.unpick(elements - filter_light_source_elements, :Descriptive)).empty? UnallowedElementsError.(element, unallowed) end end |