Method: Axlsx::Styles#parse_protection_options

Defined in:
lib/axlsx/stylesheet/styles.rb

#parse_protection_options(options = {}) ⇒ CellProtection

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • hide (Boolean)

    boolean value defining cell protection attribute for hiding.

  • locked (Boolean)

    boolean value defining cell protection attribute for locking.

Returns:



293
294
295
296
297
# File 'lib/axlsx/stylesheet/styles.rb', line 293

def parse_protection_options(options = {})
  return if (options.keys & [:hidden, :locked]).empty?

  CellProtection.new(options)
end