Method: CSL::Node#formatting_options

Defined in:
lib/csl/node.rb

#formatting_optionsHash

The node’s formatting options. If the node’s parent responds to ‘inheritable_formatting_options`, these will be included in the result. This makes it easy for nodes to push formatting options to their child nodes.

Returns:

  • (Hash)

    the node’s formatting options



442
443
444
445
446
447
448
449
450
# File 'lib/csl/node.rb', line 442

def formatting_options
  options = attributes_for Schema.attr(:formatting)

  if !root? && parent.respond_to?(:inheritable_formatting_options)
    parent.inheritable_formatting_options.merge(options)
  else
    options
  end
end