lib/axlsx/drawing/two_cell_anchor.rb in axlsx-1.0.8 vs lib/axlsx/drawing/two_cell_anchor.rb in axlsx-1.0.9

- old
+ new

@@ -22,13 +22,10 @@ # The drawing that holds this anchor # @return [Drawing] attr_reader :drawing - # The index of this anchor in the drawing - # @return [Integer] - attr_reader :index # Creates a new TwoCellAnchor object and sets up a reference to the from and to markers in the # graphic_frame's chart. That means that you can do stuff like # c = worksheet.add_chart Axlsx::Chart # c.start_at 5, 9 @@ -49,9 +46,11 @@ def add_chart(chart_type, options) @object = GraphicFrame.new(self, chart_type, options) @object.chart end + # The index of this anchor in the drawing + # @return [Integer] def index @drawing.anchors.index(self) end # Serializes the two cell anchor # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.