Class: Todoloo::TaskList::FoldedString
- Inherits:
-
Object
- Object
- Todoloo::TaskList::FoldedString
- Defined in:
- lib/todoloo/task_list/folded_string.rb
Overview
A string that is written to YAML as a folded string by default
Instance Method Summary collapse
- #encode_with(coder) ⇒ Object
-
#initialize(string) ⇒ FoldedString
constructor
A new instance of FoldedString.
Constructor Details
#initialize(string) ⇒ FoldedString
Returns a new instance of FoldedString.
4 5 6 |
# File 'lib/todoloo/task_list/folded_string.rb', line 4 def initialize(string) @string = string end |
Instance Method Details
#encode_with(coder) ⇒ Object
8 9 10 11 12 |
# File 'lib/todoloo/task_list/folded_string.rb', line 8 def encode_with(coder) coder.style = Psych::Nodes::Scalar::LITERAL coder.scalar = @string coder.tag = nil end |