diff options
| author | Geremia Taglialatela <[email protected]> | 2023-05-31 17:31:59 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-31 17:31:59 +0200 |
| commit | 4e555613a021639c12be713c438bb124622c72d3 (patch) | |
| tree | e629fb11f494e85fa1e6205792111b83474d45d9 /lib/axlsx/drawing | |
| parent | ad87c51bf8c8f59a36514bb95dc6d3a582c6b2fd (diff) | |
| download | caxlsx-4e555613a021639c12be713c438bb124622c72d3.tar.gz caxlsx-4e555613a021639c12be713c438bb124622c72d3.zip | |
Remove redundant parentheses
- Style/ParenthesesAroundCondition
- Style/RedundantParentheses
- Style/TernaryParentheses
`Style/ParenthesesAroundCondition` may be questionable, but a majority
of comparison where not using parentheses, so offenses have been fixed
for uniformity across the codebase
Diffstat (limited to 'lib/axlsx/drawing')
| -rw-r--r-- | lib/axlsx/drawing/area_series.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/drawing/bar_3D_chart.rb | 4 | ||||
| -rw-r--r-- | lib/axlsx/drawing/bar_chart.rb | 4 | ||||
| -rw-r--r-- | lib/axlsx/drawing/line_3D_chart.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/drawing/line_series.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/drawing/scatter_series.rb | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/lib/axlsx/drawing/area_series.rb b/lib/axlsx/drawing/area_series.rb index c43fe929..30bd9402 100644 --- a/lib/axlsx/drawing/area_series.rb +++ b/lib/axlsx/drawing/area_series.rb @@ -94,7 +94,7 @@ module Axlsx @labels.to_xml_string(str) unless @labels.nil? @data.to_xml_string(str) unless @data.nil? - str << '<c:smooth val="' << ((smooth) ? '1' : '0') << '"/>' + str << '<c:smooth val="' << (smooth ? '1' : '0') << '"/>' end end diff --git a/lib/axlsx/drawing/bar_3D_chart.rb b/lib/axlsx/drawing/bar_3D_chart.rb index 604a9d17..4b688668 100644 --- a/lib/axlsx/drawing/bar_3D_chart.rb +++ b/lib/axlsx/drawing/bar_3D_chart.rb @@ -99,14 +99,14 @@ module Axlsx # space between bar or column clusters, as a percentage of the bar or column width. def gap_width=(v) RangeValidator.validate "Bar3DChart.gap_width", 0, 500, v - @gap_width = (v) + @gap_width = v end alias :gapWidth= :gap_width= # space between bar or column clusters, as a percentage of the bar or column width. def gap_depth=(v) RangeValidator.validate "Bar3DChart.gap_depth", 0, 500, v - @gap_depth = (v) + @gap_depth = v end alias :gapDepth= :gap_depth= diff --git a/lib/axlsx/drawing/bar_chart.rb b/lib/axlsx/drawing/bar_chart.rb index 87fd66c0..0dcf2c11 100644 --- a/lib/axlsx/drawing/bar_chart.rb +++ b/lib/axlsx/drawing/bar_chart.rb @@ -91,13 +91,13 @@ module Axlsx # space between bar or column clusters, as a percentage of the bar or column width. def gap_width=(v) RangeValidator.validate "BarChart.gap_width", 0, 500, v - @gap_width = (v) + @gap_width = v end alias :gapWidth= :gap_width= def overlap=(v) RangeValidator.validate "BarChart.overlap", -100, 100, v - @overlap = (v) + @overlap = v end # The shape of the bars or columns diff --git a/lib/axlsx/drawing/line_3D_chart.rb b/lib/axlsx/drawing/line_3D_chart.rb index 024ece0a..54f0170f 100644 --- a/lib/axlsx/drawing/line_3D_chart.rb +++ b/lib/axlsx/drawing/line_3D_chart.rb @@ -50,7 +50,7 @@ module Axlsx # @see gapDepth def gap_depth=(v) RegexValidator.validate "Line3DChart.gapWidth", GAP_AMOUNT_PERCENT, v - @gap_depth = (v) + @gap_depth = v end alias :gapDepth= :gap_depth= diff --git a/lib/axlsx/drawing/line_series.rb b/lib/axlsx/drawing/line_series.rb index d6a412e4..9f8e09e3 100644 --- a/lib/axlsx/drawing/line_series.rb +++ b/lib/axlsx/drawing/line_series.rb @@ -94,7 +94,7 @@ module Axlsx @labels.to_xml_string(str) unless @labels.nil? @data.to_xml_string(str) unless @data.nil? - str << '<c:smooth val="' << ((smooth) ? '1' : '0') << '"/>' + str << '<c:smooth val="' << (smooth ? '1' : '0') << '"/>' end end diff --git a/lib/axlsx/drawing/scatter_series.rb b/lib/axlsx/drawing/scatter_series.rb index 2838c3de..a287a112 100644 --- a/lib/axlsx/drawing/scatter_series.rb +++ b/lib/axlsx/drawing/scatter_series.rb @@ -110,7 +110,7 @@ module Axlsx end @xData.to_xml_string(str) unless @xData.nil? @yData.to_xml_string(str) unless @yData.nil? - str << '<c:smooth val="' << ((smooth) ? '1' : '0') << '"/>' + str << '<c:smooth val="' << (smooth ? '1' : '0') << '"/>' end str end |
