summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/pic.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2013-01-15 21:53:47 +0900
committerRandy Morgan <[email protected]>2013-01-15 21:53:47 +0900
commit40c85619885de848447479b99c08e5feaea89a90 (patch)
tree61cebfceb3ac1d404e4893b376f9f3a5d72e3bd0 /lib/axlsx/drawing/pic.rb
parente14682fb484cd72ba5f479cc1f7d46a7a9fd6007 (diff)
downloadcaxlsx-40c85619885de848447479b99c08e5feaea89a90.tar.gz
caxlsx-40c85619885de848447479b99c08e5feaea89a90.zip
Refactored relationship management for drawings
This should fix #160
Diffstat (limited to 'lib/axlsx/drawing/pic.rb')
-rw-r--r--lib/axlsx/drawing/pic.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/axlsx/drawing/pic.rb b/lib/axlsx/drawing/pic.rb
index 9375f20c..8ed8d042 100644
--- a/lib/axlsx/drawing/pic.rb
+++ b/lib/axlsx/drawing/pic.rb
@@ -107,6 +107,12 @@ module Axlsx
@anchor.drawing.charts.size + @anchor.drawing.images.index(self) + 1
end
+ # Returns a relationship object for this object
+ # @return Axlsx::Relationship
+ def relationship
+ Relationship.new(IMAGE_R, "../#{pn}")
+ end
+
# providing access to the anchor's width attribute
# @param [Integer] v
# @see OneCellAnchor.width