summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/marker.rb
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-06-10 11:48:13 +0200
committerGeremia Taglialatela <[email protected]>2023-06-10 11:48:13 +0200
commitee14c1bf5c6aaa96867eb4b90b510f91c3a614f8 (patch)
tree63a893a73f1cc51003edf218fed178bb93c604d7 /lib/axlsx/drawing/marker.rb
parentcfb516062de3d0725b3245cc328f96d702d662d3 (diff)
downloadcaxlsx-ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8.tar.gz
caxlsx-ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8.zip
Fix safe Style/ColonMethodCall offenses
Caxlsx is using both `.` and `::`, 220 occurrences vs 280 to invoke methods on `Axlsx` module. This commit standardizes the approach towards `.`, which will also allow shorter lines. Performance is not affected ``` Comparison: Axlsx.validate: 8515252.3 i/s Axlsx::validate: 8512863.7 i/s - same-ish: difference falls within error ```
Diffstat (limited to 'lib/axlsx/drawing/marker.rb')
-rw-r--r--lib/axlsx/drawing/marker.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/axlsx/drawing/marker.rb b/lib/axlsx/drawing/marker.rb
index a1801eb9..ec476297 100644
--- a/lib/axlsx/drawing/marker.rb
+++ b/lib/axlsx/drawing/marker.rb
@@ -34,13 +34,13 @@ module Axlsx
attr_reader :rowOff
# @see col
- def col=(v) Axlsx::validate_unsigned_int v; @col = v end
+ def col=(v) Axlsx.validate_unsigned_int v; @col = v end
# @see colOff
- def colOff=(v) Axlsx::validate_int v; @colOff = v end
+ def colOff=(v) Axlsx.validate_int v; @colOff = v end
# @see row
- def row=(v) Axlsx::validate_unsigned_int v; @row = v end
+ def row=(v) Axlsx.validate_unsigned_int v; @row = v end
# @see rowOff
- def rowOff=(v) Axlsx::validate_int v; @rowOff = v end
+ def rowOff=(v) Axlsx.validate_int v; @rowOff = v end
# shortcut to set the column, row position for this marker
# @param col the column for the marker, a Cell object or a string reference like "B7"
@@ -68,7 +68,7 @@ module Axlsx
# @see Chart#start_at
def parse_coord_args(x, y = 0)
if x.is_a?(String)
- x, y = *Axlsx::name_to_indices(x)
+ x, y = *Axlsx.name_to_indices(x)
end
if x.is_a?(Cell)
x, y = *x.pos