Skip to content

Commit

Permalink
Renamed Helpers#format_message to Helpers.format, to prevent it from …
Browse files Browse the repository at this point in the history
…being included.
  • Loading branch information
postmodern committed May 31, 2012
1 parent 0e758fd commit 9deda1c
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lib/ronin/ui/output/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def printf(format,*data)
#
def print_info(*message)
unless Output.silent?
Output.handler.print_info(format_message(message))
Output.handler.print_info(Helpers.format(message))
return true
end

Expand All @@ -157,7 +157,7 @@ def print_info(*message)
#
def print_debug(*message)
if (Output.verbose? && !(Output.silent?))
Output.handler.print_debug(format_message(message))
Output.handler.print_debug(Helpers.format(message))
return true
end

Expand Down Expand Up @@ -185,7 +185,7 @@ def print_debug(*message)
#
def print_warning(*message)
unless Output.silent?
Output.handler.print_warning(format_message(message))
Output.handler.print_warning(Helpers.format(message))
return true
end

Expand Down Expand Up @@ -213,7 +213,7 @@ def print_warning(*message)
#
def print_error(*message)
unless Output.silent?
Output.handler.print_error(format_message(message))
Output.handler.print_error(Helpers.format(message))
return true
end

Expand Down Expand Up @@ -265,15 +265,13 @@ def print_exception(exception)
# @return [String]
# The formatted message.
#
# @since 1.0.0
#
# @api private
#
def format_message(message)
unless message.length == 1
message.first % message[1..-1]
def Helpers.format(arguments)
unless arguments.length == 1
arguments.first % arguments[1..-1]
else
message.first
arguments.first
end
end
end
Expand Down

0 comments on commit 9deda1c

Please sign in to comment.