diff options
Diffstat (limited to 'lib/axlsx/stylesheet')
| -rw-r--r-- | lib/axlsx/stylesheet/gradient_fill.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/stylesheet/gradient_stop.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/stylesheet/styles.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/axlsx/stylesheet/gradient_fill.rb b/lib/axlsx/stylesheet/gradient_fill.rb index ff6903a5..508c91a2 100644 --- a/lib/axlsx/stylesheet/gradient_fill.rb +++ b/lib/axlsx/stylesheet/gradient_fill.rb @@ -86,7 +86,7 @@ module Axlsx # validates that the value provided is between 0.0 and 1.0 def validate_format_percentage(name, value) - DataTypeValidator.validate name, Float, value, lambda { |arg| arg >= 0.0 && arg <= 1.0 } + DataTypeValidator.validate name, Float, value, ->(arg) { arg >= 0.0 && arg <= 1.0 } end # Serializes the object 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 diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb index bdda36c7..d9c5683a 100644 --- a/lib/axlsx/stylesheet/styles.rb +++ b/lib/axlsx/stylesheet/styles.rb @@ -380,7 +380,7 @@ module Axlsx end end - validate_border_hash = ->(val) { + validate_border_hash = lambda { |val| unless val.key?(:style) && val.key?(:color) raise ArgumentError, format(ERR_INVALID_BORDER_OPTIONS, options[:border]) end |
