class Til::NoteWriter

Attributes

title[R]

Public Class Methods

new(title) click to toggle source
# File lib/til/services/note_writer.rb, line 5
def initialize title
  @title = title
end

Public Instance Methods

call(if_modified, if_unmodified) click to toggle source
# File lib/til/services/note_writer.rb, line 9
def call(if_modified, if_unmodified)
  temporary_note = TemporaryNote.new
  temporary_note.write("# #{title}\n\n")
  temporary_note.edit(if_modified, if_unmodified)
end