class JekyllGitAuthors::Markdown

Public Class Methods

new(text) click to toggle source

@param [String] text - string that will be edited.

# File lib/jekyll-git-authors/markdown.rb, line 4
def initialize(text)
  @text = text
end

Public Instance Methods

center() click to toggle source

Center @text. @return [Markdown]

# 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
prefix(prefix) click to toggle source

Insert prefix before ‘@text’. e.g. +markdown.prefix(‘Authors:’)+ generates ‘Authors: foo, bar’ @return [Markdown]

# File lib/jekyll-git-authors/markdown.rb, line 25
def prefix(prefix)
  text = "#{prefix} #{@text}"
  self.class.new text
end
thematic_break() click to toggle source

Insert horizontal rule with ID ‘authors-rule’ above ‘@text’. @return [Markdown]

# File lib/jekyll-git-authors/markdown.rb, line 17
def thematic_break
  text = "\n_  _  _  _\n{: #authors-rule}" + "\n#{@text}"
  self.class.new text
end
to_s() click to toggle source

Return @text. @return [String]

# File lib/jekyll-git-authors/markdown.rb, line 32
def to_s
  @text
end