Class: Todoloo::TaskList::FoldedString

Inherits:
Object
  • Object
show all
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

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