Class: DidYouMean::Formatter
- Inherits:
-
Object
- Object
- DidYouMean::Formatter
- Defined in:
- lib/did_you_mean.rb
Overview
Deprecated formatter
Instance Method Summary collapse
-
#initialize(corrections = []) ⇒ Formatter
constructor
:nodoc:.
- #to_s ⇒ Object
Constructor Details
#initialize(corrections = []) ⇒ Formatter
:nodoc:
56 57 58 |
# File 'lib/did_you_mean.rb', line 56 def initialize(corrections = []) @corrections = corrections end |
Instance Method Details
#to_s ⇒ Object
60 61 62 63 64 65 |
# File 'lib/did_you_mean.rb', line 60 def to_s return "" if @corrections.empty? output = "\nDid you mean? ".dup output << @corrections.join("\n ") end |