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. 
- 
  
    
      #compress  ⇒ Array 
    
    
  
  
  
  
  
  
  
  
  
    Remove blank lines and comments (#). 
- #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_line(separator: ' ')  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    Returns note as a single line, newlines separated by space. 
- 
  
    
      #to_s(prefix: "\t\t")  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Note as multi-line string. 
Methods inherited from Array
Methods included from ChronifyArray
#time_string, #to_abbr, #to_natural, #to_years
Constructor Details
#initialize(note = []) ⇒ Note
Initializes a new note
Instance Method Details
#add(note, replace: false) ⇒ Object
Add note contents, optionally replacing existing note
#compress ⇒ Array
Remove blank lines and comments (#)
#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_line(separator: ' ') ⇒ String
Returns note as a single line, newlines separated by space
#to_s(prefix: "\t\t") ⇒ Object
Note as multi-line string