Skip to content

Commit

Permalink
Suppress warning: method redefined; discarding old debug=
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed May 26, 2019
1 parent 563cc61 commit 64560f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/mini_magick/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ module Configuration
#
attr_accessor :timeout
##
# When set to `true`, it outputs each command to STDOUT in their shell
# When get to `true`, it outputs each command to STDOUT in their shell
# version.
#
# @return [Boolean]
#
attr_accessor :debug
attr_reader :debug
##
# Logger for {#debug}, default is `MiniMagick::Logger.new(STDOUT)`, but
# you can override it, for example if you want the logs to be written to
Expand Down Expand Up @@ -168,6 +168,10 @@ def cli_path
@cli_path || @processor_path
end

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

0 comments on commit 64560f5

Please sign in to comment.