Method: Axlsx::Hyperlink#initialize

Defined in:
lib/axlsx/drawing/hyperlink.rb

#initialize(parent, options = {}) {|_self| ... } ⇒ Hyperlink

Creates a hyperlink object parent must be a Pic for now, although I expect that other object support this tag and its cNvPr parent

Parameters:

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

    a customizable set of options

Options Hash (options):

  • tooltip (String)

    message shown when hyperlinked object is hovered over with mouse.

  • tgtFrame (String)

    Target frame for opening hyperlink

  • invalidUrl (String)

    supposedly use to store the href when we know it is an invalid resource.

  • href (String)

    the target resource this hyperlink links to.

  • action (String)

    A string that can be used to perform specific actions. For excel please see this reference: msdn.microsoft.com/en-us/library/ff532419%28v=office.12%29.aspx

  • endSnd (Boolean)

    terminate any sound events when processing this link

  • history (Boolean)

    include this link in the list of visited links for the applications history.

  • highlightClick (Boolean)

    indicate that the link has already been visited.

Yields:

  • (_self)

Yield Parameters:



66
67
68
69
70
71
72
73
74
# File 'lib/axlsx/drawing/hyperlink.rb', line 66

def initialize(parent, options={})
  DataTypeValidator.validate "Hyperlink.parent", [Pic], parent
  @parent = parent
  options.each do |o|
    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
  end
  yield self if block_given?

end