diff options
| author | Geremia Taglialatela <[email protected]> | 2023-06-13 09:07:54 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-06-13 09:07:54 +0200 |
| commit | dd391d24da8e29525fe2c86ea7c32c1f76cfa938 (patch) | |
| tree | 6b8ccc2cea0cbdc9c9255e986daf2c7dcbe0d4c5 /lib/axlsx/stylesheet/gradient_stop.rb | |
| parent | 63a58ba6e35f4807710ba5d8935400d7e502cb30 (diff) | |
| download | caxlsx-dd391d24da8e29525fe2c86ea7c32c1f76cfa938.tar.gz caxlsx-dd391d24da8e29525fe2c86ea7c32c1f76cfa938.zip | |
Fix safe Style/Lambda offenses
- Use literal syntax on single line
- Use lambda method on multiple lines
Ref: https://rubystyle.guide/#lambda-multi-line
Diffstat (limited to 'lib/axlsx/stylesheet/gradient_stop.rb')
| -rw-r--r-- | lib/axlsx/stylesheet/gradient_stop.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/stylesheet/gradient_stop.rb b/lib/axlsx/stylesheet/gradient_stop.rb index dd0ea00f..b0d66683 100644 --- a/lib/axlsx/stylesheet/gradient_stop.rb +++ b/lib/axlsx/stylesheet/gradient_stop.rb @@ -24,7 +24,7 @@ module Axlsx # @see color def color=(v) DataTypeValidator.validate "GradientStop.color", Color, v; @color = v end # @see position - def position=(v) DataTypeValidator.validate "GradientStop.position", Float, v, lambda { |arg| arg >= 0 && arg <= 1 }; @position = v end + def position=(v) DataTypeValidator.validate "GradientStop.position", Float, v, ->(arg) { arg >= 0 && arg <= 1 }; @position = v end # Serializes the object # @param [String] str |
