Class: OoxmlParser::Tile
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::Tile
- Defined in:
- lib/ooxml_parser/common_parser/common_data/colors/tile.rb
Overview
Class for parsing ‘tile` tag
Instance Attribute Summary collapse
-
#align ⇒ Object
Returns the value of attribute align.
-
#flip ⇒ Object
Returns the value of attribute flip.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#ratio ⇒ Object
Returns the value of attribute ratio.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(offset = nil, ratio = nil, parent: nil) ⇒ Tile
constructor
A new instance of Tile.
-
#parse(node) ⇒ Tile
Parse Tile object.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(offset = nil, ratio = nil, parent: nil) ⇒ Tile
Returns a new instance of Tile.
6 7 8 9 10 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 6 def initialize(offset = nil, ratio = nil, parent: nil) @offset = offset @ratio = ratio @parent = parent end |
Instance Attribute Details
#align ⇒ Object
Returns the value of attribute align.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 4 def align @align end |
#flip ⇒ Object
Returns the value of attribute flip.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 4 def flip @flip end |
#offset ⇒ Object
Returns the value of attribute offset.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 4 def offset @offset end |
#ratio ⇒ Object
Returns the value of attribute ratio.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 4 def ratio @ratio end |
Instance Method Details
#parse(node) ⇒ Tile
Parse Tile object
15 16 17 18 19 20 21 22 23 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 15 def parse(node) node.attributes.each do |key, value| case key when 'algn' @align = value_to_symbol(value) end end self end |