Class: OoxmlParser::ClientData

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/client_data.rb

Overview

Class for parsing <clientData> tag

Instance Attribute Summary collapse

Attributes inherited from OOXMLDocumentObject

#parent

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, #boolean_attribute_value, #parse_xml, #with_data?

Methods included from OoxmlObjectAttributeHelper

#attribute_enabled?, #option_enabled?

Methods included from OoxmlDocumentObjectHelper

#to_hash

Constructor Details

#initialize(parent: nil) ⇒ ClientData

Returns a new instance of ClientData.



9
10
11
12
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/client_data.rb', line 9

def initialize(parent: nil)
  @locks_with_sheet = true
  super
end

Instance Attribute Details

#locks_with_sheetTrue, False (readonly)

Returns Specifies if drawing is locked when sheet is protected.

Returns:

  • (True, False)

    Specifies if drawing is locked when sheet is protected



7
8
9
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/client_data.rb', line 7

def locks_with_sheet
  @locks_with_sheet
end

Instance Method Details

#parse(node) ⇒ Sheet

Parse ClientData data

Parameters:

  • node (Nokogiri::XML:Element)

    with ClientData data

Returns:

  • (Sheet)

    value of ClientData



17
18
19
20
21
22
23
24
25
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/client_data.rb', line 17

def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'fLocksWithSheet'
      @locks_with_sheet = attribute_enabled?(value)
    end
  end
  self
end