examples/shape8.rb in write_xlsx-1.10.0 vs examples/shape8.rb in write_xlsx-1.10.1
- old
+ new
@@ -20,36 +20,36 @@
ch = 60
cx = 210
cy = 190
ellipse = workbook.add_shape(
- :type => 'ellipse',
- :id => 2,
- :text => "Hello\nWorld",
- :width => cw,
- :height => ch
+ type: 'ellipse',
+ id: 2,
+ text: "Hello\nWorld",
+ width: cw,
+ height: ch
)
worksheet.insert_shape('A1', ellipse, cx, cy)
# Add a plus sign at 4 different positionos around the circle.
pw = 20
ph = 20
px = 120
py = 250
plus = workbook.add_shape(
- :type => 'plus',
- :id => 3,
- :width => pw,
- :height => ph
+ type: 'plus',
+ id: 3,
+ width: pw,
+ height: ph
)
p1 = worksheet.insert_shape('A1', plus, 350, 150)
p2 = worksheet.insert_shape('A1', plus, 350, 350)
p3 = worksheet.insert_shape('A1', plus, 150, 350)
p4 = worksheet.insert_shape('A1', plus, 150, 150)
-cxn_shape = workbook.add_shape(:type => 'bentConnector3', :fill => 0)
+cxn_shape = workbook.add_shape(type: 'bentConnector3', fill: 0)
cxn_shape.start = ellipse.id
cxn_shape.start_index = 2 # 2nd connection pt, clockwise from top(0).
cxn_shape.start_side = 'r' # r)ight or b)ottom.