Class: Rocx::Properties::ParagraphBorders

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

Constant Summary

Constants included from AttributeBuilder

AttributeBuilder::VALID_THEME_COLORS, AttributeBuilder::VALID_TYPES

Instance Attribute Summary collapse

Attributes inherited from BaseProperty

#value

Instance Method Summary collapse

Methods included from AttributeBuilder

#attributes, included

Methods inherited from BaseProperty

#default_name, #default_tag, name, #name, tag, #tag

Constructor Details

#initializeParagraphBorders

Returns a new instance of ParagraphBorders.



6
7
8
9
10
11
12
13
# File 'lib/rocx/properties/paragraph_borders.rb', line 6

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.



4
5
6
# File 'lib/rocx/properties/paragraph_borders.rb', line 4

def bar
  @bar
end

#betweenObject (readonly)

Returns the value of attribute between.



4
5
6
# File 'lib/rocx/properties/paragraph_borders.rb', line 4

def between
  @between
end

#bottomObject (readonly)

Returns the value of attribute bottom.



4
5
6
# File 'lib/rocx/properties/paragraph_borders.rb', line 4

def bottom
  @bottom
end

#leftObject (readonly)

Returns the value of attribute left.



4
5
6
# File 'lib/rocx/properties/paragraph_borders.rb', line 4

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



4
5
6
# File 'lib/rocx/properties/paragraph_borders.rb', line 4

def right
  @right
end

#topObject (readonly)

Returns the value of attribute top.



4
5
6
# File 'lib/rocx/properties/paragraph_borders.rb', line 4

def top
  @top
end

Instance Method Details

#render?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/rocx/properties/paragraph_borders.rb', line 18

def render?
  renderable_borders.any?
end

#to_xml(xml) ⇒ Object



22
23
24
25
# File 'lib/rocx/properties/paragraph_borders.rb', line 22

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