diff options
| author | Geremia Taglialatela <[email protected]> | 2023-05-20 17:19:24 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-20 17:19:24 +0200 |
| commit | 90db2eecf0271b9597891dc3dd96b2b0b26ec5d3 (patch) | |
| tree | f6528b095a3ff407e4afab262c65b5ef0ee18571 /lib/axlsx/drawing | |
| parent | 6a4b82def2e94b4811c38c37e606d426710d1e6c (diff) | |
| download | caxlsx-90db2eecf0271b9597891dc3dd96b2b0b26ec5d3.tar.gz caxlsx-90db2eecf0271b9597891dc3dd96b2b0b26ec5d3.zip | |
Fix Lint/Void offenses
Setter methods return the assigned value. Given:
```rb
class MyClass
def foo=(v)
v = 10
42
end
end
```
`my_object.foo = 5` will always return `5`
This methods removes code that does not have effect
Diffstat (limited to 'lib/axlsx/drawing')
| -rw-r--r-- | lib/axlsx/drawing/title.rb | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/axlsx/drawing/title.rb b/lib/axlsx/drawing/title.rb index c3ca9632..2e4037fb 100644 --- a/lib/axlsx/drawing/title.rb +++ b/lib/axlsx/drawing/title.rb @@ -32,7 +32,6 @@ module Axlsx DataTypeValidator.validate 'Title.text', String, v @text = v @cell = nil - v end # @see text_size @@ -40,7 +39,6 @@ module Axlsx DataTypeValidator.validate 'Title.text_size', String, v @text_size = v @cell = nil - v end # @see cell @@ -48,7 +46,6 @@ module Axlsx DataTypeValidator.validate 'Title.text', Cell, v @cell = v @text = v.value.to_s - v end # Check if the title is empty. |
