Method: Axlsx::TwoCellAnchor#initialize

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

#initialize(drawing, options = {}) ⇒ TwoCellAnchor

Creates a new TwoCellAnchor object c.start_at 5, 9

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :start_at (Array)

    the col, row to start at THIS IS DOCUMENTED BUT NOT IMPLEMENTED HERE!

  • :end_at (Array)

    the col, row to end at



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/axlsx/drawing/two_cell_anchor.rb', line 35

def initialize(drawing, options={})
  @drawing = drawing
  drawing.anchors << self
  @from, @to =  Marker.new, Marker.new(:col => 5, :row=>10)
  parse_options options

  # bit of a hack to work around the fact that the coords for start at and end at
  # are passed in as an array when specified in intialization options - however
  start_at(*options[:start_at]) if options[:start_at]
  end_at(*options[:end_at]) if options[:end_at]
end