Module: Uniword::Builder::HasShading

Included in:
ParagraphBuilder, RunBuilder, TableBuilder, TableCellBuilder
Defined in:
lib/uniword/builder/has_shading.rb

Overview

Mixin for builders that support shading configuration.

Expects the including class to implement #ensure_properties returning the properties object that has a #shading= setter.

Instance Method Summary collapse

Instance Method Details

#shading(fill:, color: nil, pattern: "clear") ⇒ Object



10
11
12
13
14
15
16
# File 'lib/uniword/builder/has_shading.rb', line 10

def shading(fill:, color: nil, pattern: "clear")
  props = ensure_properties
  props.shading = Properties::Shading.new(
    fill: fill, color: color, pattern: pattern,
  )
  self
end