Method: Lifer::Entry#body

Defined in:
lib/lifer/entry.rb

#bodyString

This method returns the full text of the entry, only removing the frontmatter. It should not parse anything other than frontmatter.

Returns:

  • (String)

    The body of the entry.



143
144
145
146
147
# File 'lib/lifer/entry.rb', line 143

def body
  return full_text.strip unless frontmatter?

  full_text.gsub(Lifer::FRONTMATTER_REGEX, "").strip
end