Sha256: eb7599114ee4e8a07b1cdd0f741ebe7e30381f2977f5c12a4ff3457f843978b6
Contents?: true
Size: 915 Bytes
Versions: 32
Compression:
Stored size: 915 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Class for parsing <definedName> tag class DefinedName < OOXMLDocumentObject # @return [String] Ranges to which defined name refers attr_reader :range # @return [String] Name attr_reader :name # @return [String] Id of sheet attr_reader :local_sheet_id # @return [Symbol] Specifies whether defined name is hidden attr_reader :hidden # Parse Defined Name data # @param [Nokogiri::XML:Element] node with DefinedName data # @return [DefinedName] value of DefinedName def parse(node) @range = node.text node.attributes.each do |key, value| case key when 'name' @name = value.value.to_s when 'localSheetId' @local_sheet_id = value.value.to_i when 'hidden' @hidden = attribute_enabled?(value) end end self end end end
Version data entries
32 entries across 32 versions & 1 rubygems