Class: TopSecret::FilteredText::Result
- Inherits:
-
Object
- Object
- TopSecret::FilteredText::Result
- Defined in:
- lib/top_secret/filtered_text/result.rb
Overview
Result object returned by FilteredText restoration operations.
Contains the restored text along with tracking information about which placeholders were successfully restored and which remain unrestored.
Instance Attribute Summary collapse
-
#output ⇒ String
readonly
The text with placeholders restored to original values.
-
#restored ⇒ Array<String>
readonly
Array of placeholder strings that were successfully restored.
-
#unrestored ⇒ Array<String>
readonly
Array of placeholder strings that could not be restored.
Instance Method Summary collapse
-
#initialize(output, unrestored, restored) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(output, unrestored, restored) ⇒ Result
Returns a new instance of Result.
22 23 24 25 26 |
# File 'lib/top_secret/filtered_text/result.rb', line 22 def initialize(output, unrestored, restored) @output = output @unrestored = unrestored @restored = restored end |
Instance Attribute Details
#output ⇒ String (readonly)
Returns The text with placeholders restored to original values.
11 12 13 |
# File 'lib/top_secret/filtered_text/result.rb', line 11 def output @output end |
#restored ⇒ Array<String> (readonly)
Returns Array of placeholder strings that were successfully restored.
17 18 19 |
# File 'lib/top_secret/filtered_text/result.rb', line 17 def restored @restored end |
#unrestored ⇒ Array<String> (readonly)
Returns Array of placeholder strings that could not be restored.
14 15 16 |
# File 'lib/top_secret/filtered_text/result.rb', line 14 def unrestored @unrestored end |