Class: Coradoc::CoreModel::FrontmatterBlock::TextSplitter::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/coradoc/core_model/frontmatter/text_splitter.rb

Overview

Result of splitting source text. frontmatter is the raw YAML body (without delimiters), nil if no frontmatter was present. body is the remaining document text.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



28
29
30
# File 'lib/coradoc/core_model/frontmatter/text_splitter.rb', line 28

def body
  @body
end

#frontmatterObject

Returns the value of attribute frontmatter

Returns:

  • (Object)

    the current value of frontmatter



28
29
30
# File 'lib/coradoc/core_model/frontmatter/text_splitter.rb', line 28

def frontmatter
  @frontmatter
end

Instance Method Details

#frontmatter?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/coradoc/core_model/frontmatter/text_splitter.rb', line 29

def frontmatter?
  !frontmatter.nil? && !frontmatter.empty?
end