class Answer

Attributes

author[RW]
avatar[RW]
bio[RW]
content[RW]
question[RW]

Public Class Methods

new() click to toggle source
# File lib/zhSieve/answer.rb, line 4
def initialize
        @author = 'NA'
        @bio = 'NA'
        @avatar = 'NA'
        @link = 'NA'
        @content = 'NA'
        @question = 'NA'
        @author_link = 'NA'
end

Public Instance Methods

format_markdown() click to toggle source
# File lib/zhSieve/answer.rb, line 14
def format_markdown
        res_file = "## " + "[#{@question}](" + @link + ")" + "\n"
        res_file += "### "+@avatar + "[#{@author}](" + @author_link + ")"  + "\n"
        res_file += "#### "+@bio + "\n"
        res_file += "*****\n"
        res_file += @content
        res_file
end