Class: OoxmlParser::FrameProperties
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::FrameProperties
- Defined in:
- lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb
Overview
Class for data with FrameProperties
Instance Attribute Summary collapse
-
#anchor_lock ⇒ Object
Returns the value of attribute anchor_lock.
-
#drop_cap ⇒ Object
Returns the value of attribute drop_cap.
-
#height ⇒ Object
Returns the value of attribute height.
-
#height_rule ⇒ Object
Returns the value of attribute height_rule.
-
#horizontal_align ⇒ Object
Returns the value of attribute horizontal_align.
-
#horizontal_anchor ⇒ Object
Returns the value of attribute horizontal_anchor.
-
#horizontal_position ⇒ Object
Returns the value of attribute horizontal_position.
-
#horizontal_space ⇒ Object
Returns the value of attribute horizontal_space.
-
#lines ⇒ Object
Returns the value of attribute lines.
-
#vertical_align ⇒ Object
Returns the value of attribute vertical_align.
-
#vertical_anchor ⇒ Object
Returns the value of attribute vertical_anchor.
-
#vertical_position ⇒ Object
Returns the value of attribute vertical_position.
-
#vertical_space ⇒ Object
Returns the value of attribute vertical_space.
-
#width ⇒ Object
Returns the value of attribute width.
-
#wrap ⇒ Object
Returns the value of attribute wrap.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ FrameProperties
Parse FrameProperties.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#anchor_lock ⇒ Object
Returns the value of attribute anchor_lock.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def anchor_lock @anchor_lock end |
#drop_cap ⇒ Object
Returns the value of attribute drop_cap.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def drop_cap @drop_cap end |
#height ⇒ Object
Returns the value of attribute height.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def height @height end |
#height_rule ⇒ Object
Returns the value of attribute height_rule.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def height_rule @height_rule end |
#horizontal_align ⇒ Object
Returns the value of attribute horizontal_align.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def horizontal_align @horizontal_align end |
#horizontal_anchor ⇒ Object
Returns the value of attribute horizontal_anchor.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def horizontal_anchor @horizontal_anchor end |
#horizontal_position ⇒ Object
Returns the value of attribute horizontal_position.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def horizontal_position @horizontal_position end |
#horizontal_space ⇒ Object
Returns the value of attribute horizontal_space.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def horizontal_space @horizontal_space end |
#lines ⇒ Object
Returns the value of attribute lines.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def lines @lines end |
#vertical_align ⇒ Object
Returns the value of attribute vertical_align.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def vertical_align @vertical_align end |
#vertical_anchor ⇒ Object
Returns the value of attribute vertical_anchor.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def vertical_anchor @vertical_anchor end |
#vertical_position ⇒ Object
Returns the value of attribute vertical_position.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def vertical_position @vertical_position end |
#vertical_space ⇒ Object
Returns the value of attribute vertical_space.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def vertical_space @vertical_space end |
#width ⇒ Object
Returns the value of attribute width.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def width @width end |
#wrap ⇒ Object
Returns the value of attribute wrap.
6 7 8 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 6 def wrap @wrap end |
Instance Method Details
#parse(node) ⇒ FrameProperties
Parse FrameProperties
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/frame_properties.rb', line 13 def parse(node) node.attributes.each do |key, value| case key when 'dropCap' @drop_cap = value.value.to_sym when 'lines' @lines = value.value.to_i when 'wrap' @lines = value.value.to_sym when 'vAnchor' @vertical_anchor = value.value.to_sym when 'hAnchor' @horizontal_anchor = value.value.to_sym when 'w' @width = OoxmlSize.new(value.value.to_f) when 'h' @height = OoxmlSize.new(value.value.to_f) when 'hRule' @height_rule = value.value.to_s.sub('atLeast', 'at_least').to_sym when 'xAlign' @horizontal_align = value.value.to_sym when 'yAlign' @vertical_align = value.value.to_sym when 'anchorLock' @anchor_lock = attribute_enabled?(value) when 'vSpace' @vertical_space = OoxmlSize.new(value.value.to_f) when 'hSpace' @horizontal_space = OoxmlSize.new(value.value.to_f) when 'x' @horizontal_position = OoxmlSize.new(value.value.to_f) when 'y' @vertical_position = OoxmlSize.new(value.value.to_f) end end self end |