Class: OoxmlParser::TablePosition
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TablePosition
- Defined in:
- lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb
Overview
Table Position Data
Instance Attribute Summary collapse
-
#bottom ⇒ Object
Returns the value of attribute bottom.
-
#horizontal_align_from_anchor ⇒ Object
Returns the value of attribute horizontal_align_from_anchor.
-
#horizontal_anchor ⇒ Object
Returns the value of attribute horizontal_anchor.
-
#left ⇒ Object
Returns the value of attribute left.
-
#position_x ⇒ Object
Returns the value of attribute position_x.
-
#position_y ⇒ Object
Returns the value of attribute position_y.
-
#right ⇒ Object
Returns the value of attribute right.
-
#top ⇒ Object
Returns the value of attribute top.
-
#vertical_align_from_anchor ⇒ Object
Returns the value of attribute vertical_align_from_anchor.
-
#vertical_anchor ⇒ Object
Returns the value of attribute vertical_anchor.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ TablePosition
Parse TablePosition object.
-
#to_s ⇒ String
Result of convert of object to string.
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
#bottom ⇒ Object
Returns the value of attribute bottom.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 6 def bottom @bottom end |
#horizontal_align_from_anchor ⇒ Object
Returns the value of attribute horizontal_align_from_anchor.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 6 def horizontal_align_from_anchor @horizontal_align_from_anchor end |
#horizontal_anchor ⇒ Object
Returns the value of attribute horizontal_anchor.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 6 def horizontal_anchor @horizontal_anchor end |
#left ⇒ Object
Returns the value of attribute left.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 6 def left @left end |
#position_x ⇒ Object
Returns the value of attribute position_x.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 6 def position_x @position_x end |
#position_y ⇒ Object
Returns the value of attribute position_y.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 6 def position_y @position_y end |
#right ⇒ Object
Returns the value of attribute right.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 6 def right @right end |
#top ⇒ Object
Returns the value of attribute top.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 6 def top @top end |
#vertical_align_from_anchor ⇒ Object
Returns the value of attribute vertical_align_from_anchor.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 6 def vertical_align_from_anchor @vertical_align_from_anchor end |
#vertical_anchor ⇒ Object
Returns the value of attribute vertical_anchor.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 6 def vertical_anchor @vertical_anchor end |
Instance Method Details
#parse(node) ⇒ TablePosition
Parse TablePosition object
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 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 22 def parse(node) node.attributes.each do |key, value| case key when 'leftFromText' @left = OoxmlSize.new(value.value.to_f) when 'rightFromText' @right = OoxmlSize.new(value.value.to_f) when 'topFromText' @top = OoxmlSize.new(value.value.to_f) when 'bottomFromText' @bottom = OoxmlSize.new(value.value.to_f) when 'tblpX' @position_x = OoxmlSize.new(value.value.to_f) when 'tblpY' @position_y = OoxmlSize.new(value.value.to_f) when 'vertAnchor' @vertical_anchor = value.value.to_sym when 'horzAnchor' @horizontal_anchor = value.value.to_sym when 'tblpXSpec' @horizontal_align_from_anchor = value.value.to_sym when 'tblpYSpec' @vertical_align_from_anchor = value.value.to_sym end end self end |
#to_s ⇒ String
Returns result of convert of object to string.
10 11 12 13 14 15 16 17 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb', line 10 def to_s "Table position left: #{left}, " \ "right: #{right}, " \ "top: #{top}, " \ "bottom #{bottom}, " \ "position x: #{position_x}, " \ "position y: #{position_y}" end |