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:



250
251
252
253
# File 'lib/axlsx/stylesheet/styles.rb', line 250

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