Skip to content

Commit 64560f5

Browse files
committed
Suppress warning: method redefined; discarding old debug=
1 parent 563cc61 commit 64560f5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/mini_magick/configuration.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ module Configuration
3939
#
4040
attr_accessor :timeout
4141
##
42-
# When set to `true`, it outputs each command to STDOUT in their shell
42+
# When get to `true`, it outputs each command to STDOUT in their shell
4343
# version.
4444
#
4545
# @return [Boolean]
4646
#
47-
attr_accessor :debug
47+
attr_reader :debug
4848
##
4949
# Logger for {#debug}, default is `MiniMagick::Logger.new(STDOUT)`, but
5050
# you can override it, for example if you want the logs to be written to
@@ -168,6 +168,10 @@ def cli_path
168168
@cli_path || @processor_path
169169
end
170170

171+
##
172+
# When set to `true`, it outputs each command to STDOUT in their shell
173+
# version.
174+
#
171175
def debug=(value)
172176
warn "MiniMagick.debug is deprecated and will be removed in MiniMagick 5. Use `MiniMagick.logger.level = Logger::DEBUG` instead."
173177
logger.level = value ? Logger::DEBUG : Logger::INFO

0 commit comments

Comments
 (0)