Class: Jekyll::AgentMarkdown::MetadataFooter
- Inherits:
-
Object
- Object
- Jekyll::AgentMarkdown::MetadataFooter
- Defined in:
- lib/jekyll/agent_markdown/metadata_footer.rb
Instance Method Summary collapse
- #append_to(content) ⇒ Object
-
#initialize(entries) ⇒ MetadataFooter
constructor
A new instance of MetadataFooter.
Constructor Details
#initialize(entries) ⇒ MetadataFooter
Returns a new instance of MetadataFooter.
6 7 8 |
# File 'lib/jekyll/agent_markdown/metadata_footer.rb', line 6 def initialize(entries) @text = entries.compact.reject(&:empty?).join(" | ") end |
Instance Method Details
#append_to(content) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/jekyll/agent_markdown/metadata_footer.rb', line 10 def append_to(content) return content if text.empty? return "#{text}\n" if content.empty? "#{content}#{separator_for(content)}---\n#{text}\n" end |