Method: Axlsx::Comments#initialize

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

#initialize(worksheet) ⇒ Comments

Creates a new Comments object

Parameters:

  • worksheet (Worksheet)

    The sheet that these comments belong to.

Raises:

  • (ArgumentError)


29
30
31
32
33
34
# File 'lib/axlsx/workbook/worksheet/comments.rb', line 29

def initialize(worksheet)
  raise ArgumentError, "you must provide a worksheet" unless worksheet.is_a?(Worksheet)
  super(Comment)
  @worksheet = worksheet
  @vml_drawing = VmlDrawing.new(self)
end