class JekyllGitAuthors::Markdown
Public Class Methods
Source
# File lib/jekyll-git-authors/markdown.rb, line 4 def initialize(text) @text = text end
@param [String] text - string that will be edited.
Public Instance Methods
Source
# File lib/jekyll-git-authors/markdown.rb, line 10 def center text = %Q|{:center: style="text-align: center"}\n#{@text}\n{:center}| self.class.new text end
Center @text. @return [Markdown]
Source
# File lib/jekyll-git-authors/markdown.rb, line 25 def prefix(prefix) text = "#{prefix} #{@text}" self.class.new text end
Insert prefix before ‘@text’. e.g. +markdown.prefix(‘Authors:’)+ generates ‘Authors: foo, bar’ @return [Markdown]
Source
# File lib/jekyll-git-authors/markdown.rb, line 17 def thematic_break text = "\n_ _ _ _\n{: #authors-rule}" + "\n#{@text}" self.class.new text end
Insert horizontal rule with ID ‘authors-rule’ above ‘@text’. @return [Markdown]
Source
# File lib/jekyll-git-authors/markdown.rb, line 32 def to_s @text end
Return @text. @return [String]