Method: Axlsx::WorksheetHyperlink#initialize

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

#initialize(worksheet, options = {}) {|_self| ... } ⇒ WorksheetHyperlink

Note:

the preferred way to add hyperlinks to your worksheet is the Worksheet#add_hyperlink method

Creates a new hyperlink object.

Parameters:

  • worksheet (Worksheet)

    the Worksheet that owns this hyperlink

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

    options to use when creating this hyperlink

  • [String] (Hash)

    a customizable set of options

  • [Symbol] (Hash)

    a customizable set of options

  • [String|Cell] (Hash)

    a customizable set of options

Yields:

  • (_self)

Yield Parameters:



18
19
20
21
22
23
24
# File 'lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb', line 18

def initialize(worksheet, options={})
  DataTypeValidator.validate "Hyperlink.worksheet", [Worksheet], worksheet
  @worksheet = worksheet
  @target = :external
  parse_options options
  yield self if block_given?
end