Class: Notebroker::Cells::Markdown

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Defined in:
lib/notebroker/cells/markdown.rb

Instance Method Summary collapse

Instance Method Details

#to_markdownObject



10
11
12
13
14
15
16
17
18
# File 'lib/notebroker/cells/markdown.rb', line 10

def to_markdown
  return unless lines.any?

  if lines.last[-1] == "\n"
    lines.join
  else
    lines.join + "\n"
  end
end