Sha256: bafa4b6a2087be03ca6101e3802530eaedcfcf20d400e91b4799fe936505649a

Contents?: true

Size: 615 Bytes

Versions: 8

Compression:

Stored size: 615 Bytes

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing `tile` tag
  class Tile < OOXMLDocumentObject
    attr_accessor :offset, :ratio, :flip, :align

    def initialize(offset = nil, ratio = nil, parent: nil)
      @offset = offset
      @ratio = ratio
      @parent = parent
    end

    # Parse Tile object
    # @param node [Nokogiri::XML:Element] node to parse
    # @return [Tile] result of parsing
    def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'algn'
          @align = value_to_symbol(value)
        end
      end
      self
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ooxml_parser-0.8.1 lib/ooxml_parser/common_parser/common_data/colors/tile.rb
ooxml_parser-0.8.0 lib/ooxml_parser/common_parser/common_data/colors/tile.rb
ooxml_parser-0.7.2 lib/ooxml_parser/common_parser/common_data/colors/tile.rb
ooxml_parser-0.7.1 lib/ooxml_parser/common_parser/common_data/colors/tile.rb
ooxml_parser-0.7.0 lib/ooxml_parser/common_parser/common_data/colors/tile.rb
ooxml_parser-0.6.0 lib/ooxml_parser/common_parser/common_data/colors/tile.rb
ooxml_parser-0.5.1 lib/ooxml_parser/common_parser/common_data/colors/tile.rb
ooxml_parser-0.5.0 lib/ooxml_parser/common_parser/common_data/colors/tile.rb