class Article

Attributes

author[RW]
avatar[RW]
bio[RW]
content[RW]
published_time[RW]
title[RW]
title_image[RW]

Public Class Methods

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

Public Instance Methods

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