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
#==, #boolean_attribute_value, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(offset = nil, ratio = nil, parent: nil) ⇒ Tile
Returns a new instance of Tile.
8 9 10 11 12 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 8 def initialize(offset = nil, ratio = nil, parent: nil) @offset = offset @ratio = ratio super(parent: parent) end |
Instance Attribute Details
#align ⇒ Object
Returns the value of attribute align.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 6 def align @align end |
#flip ⇒ Object
Returns the value of attribute flip.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 6 def flip @flip end |
#offset ⇒ Object
Returns the value of attribute offset.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 6 def offset @offset end |
#ratio ⇒ Object
Returns the value of attribute ratio.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 6 def ratio @ratio end |
Instance Method Details
#parse(node) ⇒ Tile
Parse Tile object
17 18 19 20 21 22 23 24 25 |
# File 'lib/ooxml_parser/common_parser/common_data/colors/tile.rb', line 17 def parse(node) node.attributes.each do |key, value| case key when 'algn' @align = value_to_symbol(value) end end self end |