Class: OpenXml::Docx::Properties::ParagraphBorders
- Inherits:
-
ComplexProperty
- Object
- BaseProperty
- ComplexProperty
- OpenXml::Docx::Properties::ParagraphBorders
- Defined in:
- lib/openxml/docx/properties/paragraph_borders.rb
Instance Attribute Summary collapse
-
#bar ⇒ Object
readonly
Returns the value of attribute bar.
-
#between ⇒ Object
readonly
Returns the value of attribute between.
-
#bottom ⇒ Object
readonly
Returns the value of attribute bottom.
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
-
#top ⇒ Object
readonly
Returns the value of attribute top.
Attributes inherited from BaseProperty
Instance Method Summary collapse
-
#initialize ⇒ ParagraphBorders
constructor
A new instance of ParagraphBorders.
- #render? ⇒ Boolean
- #to_xml(xml) ⇒ Object
Methods inherited from BaseProperty
#default_name, #default_namespace, #default_tag, #name, name, namespace, #namespace, #tag, tag, tag_is_one_of
Constructor Details
#initialize ⇒ ParagraphBorders
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
#bar ⇒ Object (readonly)
Returns the value of attribute bar.
5 6 7 |
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 5 def @bar end |
#between ⇒ Object (readonly)
Returns the value of attribute between.
5 6 7 |
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 5 def between @between end |
#bottom ⇒ Object (readonly)
Returns the value of attribute bottom.
5 6 7 |
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 5 def bottom @bottom end |
#left ⇒ Object (readonly)
Returns the value of attribute left.
5 6 7 |
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 5 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
5 6 7 |
# File 'lib/openxml/docx/properties/paragraph_borders.rb', line 5 def right @right end |
#top ⇒ Object (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
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 |