Class: Doing::Note
Overview
This class describes an item note.
Instance Method Summary collapse
-
#add(note, replace: false) ⇒ Object
Add note contents, optionally replacing existing note.
-
#append(lines) ⇒ Object
Append an array of strings to note.
-
#append_string(input) ⇒ Object
Append a string to the note content.
-
#compress ⇒ Array
Remove blank lines and comment lines (#).
- #compress! ⇒ Object
-
#equal?(other) ⇒ Boolean
Test if a note is equal (compare string representations).
-
#initialize(note = []) ⇒ Note
constructor
Initializes a new note.
-
#strip_lines ⇒ Array
Remove leading/trailing whitespace for every line of note.
- #strip_lines! ⇒ Object
-
#to_s ⇒ Object
Note as multi-line string.
Methods inherited from Array
#highlight_tags, #log_tags, #nested_hash, #to_tags, #to_tags!
Constructor Details
#initialize(note = []) ⇒ Note
Initializes a new note
Instance Method Details
#add(note, replace: false) ⇒ Object
Add note contents, optionally replacing existing note
#append(lines) ⇒ Object
Append an array of strings to note
#append_string(input) ⇒ Object
Append a string to the note content
#compress ⇒ Array
Remove blank lines and comment lines (#)
#compress! ⇒ Object
#equal?(other) ⇒ Boolean
Test if a note is equal (compare string representations)
#strip_lines ⇒ Array
Remove leading/trailing whitespace for every line of note
#strip_lines! ⇒ Object
#to_s ⇒ Object
Note as multi-line string