Method: Axlsx::WorksheetHyperlink#location_or_id

Defined in:
lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb

#location_or_idHash

The values to be used in serialization based on the target. location should only be specified for non-external targets. r:id should only be specified for external targets.

Returns:

  • (Hash)


72
73
74
# File 'lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb', line 72

def location_or_id
  @target == :external ? { "r:id": relationship.Id } : { location: Axlsx.coder.encode(location) }
end