REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.27 KB
Close
//proc/thread-self/root/opt/alt/ruby31/share/ruby/did_you_mean/formatter.rb
Text
Base64
# frozen-string-literal: true module DidYouMean # The +DidYouMean::Formatter+ is the basic, default formatter for the # gem. The formatter responds to the +message_for+ method and it returns a # human readable string. class Formatter # Returns a human readable string that contains +corrections+. This # formatter is designed to be less verbose to not take too much screen # space while being helpful enough to the user. # # @example # # formatter = DidYouMean::Formatter.new # # # displays suggestions in two lines with the leading empty line # puts formatter.message_for(["methods", "method"]) # # Did you mean? methods # method # # => nil # # # displays an empty line # puts formatter.message_for([]) # # # => nil # def self.message_for(corrections) corrections.empty? ? "" : "\nDid you mean? #{corrections.join("\n ")}" end def message_for(corrections) warn "The instance method #message_for has been deprecated. Please use the class method " \ "DidYouMean::Formatter.message_for(...) instead." self.class.message_for(corrections) end end PlainFormatter = Formatter deprecate_constant :PlainFormatter end
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 3 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
core_ext
DIR
-
drwxr-xr-x
2025-05-13 07:34:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
formatters
DIR
-
drwxr-xr-x
2025-05-13 07:34:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
spell_checkers
DIR
-
drwxr-xr-x
2025-05-13 07:34:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
experimental.rb
139 B
lrw-r--r--
2025-04-28 17:36:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
formatter.rb
1.27 KB
lrw-r--r--
2025-04-28 17:36:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
jaro_winkler.rb
1.79 KB
lrw-r--r--
2025-04-28 17:36:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
levenshtein.rb
1.34 KB
lrw-r--r--
2025-04-28 17:36:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
spell_checker.rb
1.27 KB
lrw-r--r--
2025-04-28 17:36:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tree_spell_checker.rb
2.81 KB
lrw-r--r--
2025-04-28 17:36:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
verbose.rb
137 B
lrw-r--r--
2025-04-28 17:36:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
version.rb
49 B
lrw-r--r--
2025-04-28 17:36:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).