summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKoza <[email protected]>2023-04-12 17:32:20 +0200
committerKoza <[email protected]>2023-04-12 17:32:20 +0200
commit518e74f8769daf67fca461139d3c7229abdb6e60 (patch)
treec377925f9f0ea9106d3c7d808130863c11a6ce63
parent909419f43ed994b7fc4aa247453f1d309be3dab3 (diff)
downloadcaxlsx-518e74f8769daf67fca461139d3c7229abdb6e60.tar.gz
caxlsx-518e74f8769daf67fca461139d3c7229abdb6e60.zip
Rubocop fixes
-rw-r--r--lib/axlsx/drawing/pic.rb6
-rw-r--r--test/drawing/tc_pic.rb2
2 files changed, 1 insertions, 7 deletions
diff --git a/lib/axlsx/drawing/pic.rb b/lib/axlsx/drawing/pic.rb
index dda1763c..e31876bf 100644
--- a/lib/axlsx/drawing/pic.rb
+++ b/lib/axlsx/drawing/pic.rb
@@ -98,11 +98,7 @@ module Axlsx
def remote=(v) Axlsx::validate_boolean(v); @remote = v; end
def remote?
- if remote == 1 || remote.to_s == 'true'
- true
- else
- false
- end
+ remote == 1 || remote.to_s == 'true'
end
# The file name of image_src without any path information
diff --git a/test/drawing/tc_pic.rb b/test/drawing/tc_pic.rb
index d38d5e9a..34f24eb3 100644
--- a/test/drawing/tc_pic.rb
+++ b/test/drawing/tc_pic.rb
@@ -27,7 +27,6 @@ class TestPic < Test::Unit::TestCase
assert_equal(@image_remote.remote?, true)
end
-
def test_anchor_swapping
# swap from one cell to two cell when end_at is specified
assert(@image.anchor.is_a?(Axlsx::OneCellAnchor))
@@ -94,7 +93,6 @@ class TestPic < Test::Unit::TestCase
assert_equal(@image_remote.image_src, @test_img_remote_png)
end
-
def test_descr
assert_raise(ArgumentError) { @image.descr = 49 }
assert_nothing_raised { @image.descr = "test" }