Class: OpenXml::Docx::Properties::ParagraphBorders

Inherits:
ComplexProperty show all
Defined in:
lib/openxml/docx/properties/paragraph_borders.rb

Instance Attribute Summary collapse

Attributes inherited from BaseProperty

#value

Instance Method Summary collapse

Methods inherited from BaseProperty

#default_name, #default_namespace, #default_tag, #name, name, namespace, #namespace, tag, #tag, tag_is_one_of

Constructor Details

#initializeParagraphBorders

Returns a new instance of ParagraphBorders.


7
8
9
10
11
12
13
14
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 7

def initialize
  @left = new_border :left
  @right = new_border :right
  @top = new_border :top
  @bottom = new_border :bottom
  @between = new_border :between
  @bar = new_border :bar
end

Instance Attribute Details

#barObject (readonly)

Returns the value of attribute bar


5
6
7
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 5

def bar
  @bar
end

#betweenObject (readonly)

Returns the value of attribute between


5
6
7
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 5

def between
  @between
end

#bottomObject (readonly)

Returns the value of attribute bottom


5
6
7
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 5

def bottom
  @bottom
end

#leftObject (readonly)

Returns the value of attribute left


5
6
7
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 5

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right


5
6
7
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 5

def right
  @right
end

#topObject (readonly)

Returns the value of attribute top


5
6
7
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 5

def top
  @top
end

Instance Method Details

#render?Boolean

Returns:

  • (Boolean)

19
20
21
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 19

def render?
  renderable_borders.any?
end

#to_xml(xml) ⇒ Object


23
24
25
26
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 23

def to_xml(xml)
  return unless render?
  xml["w"].public_send(tag) { render_borders_xml(xml) }
end