class MdWebBrowse::Parser

Public Class Methods

new() click to toggle source
# File lib/md_web_browse/cli.rb, line 3
def initialize
end

Public Instance Methods

md_to_html(md_name) click to toggle source
# File lib/md_web_browse/cli.rb, line 18
def md_to_html(md_name)
  GitHub::Markup.render(md_name, File.read(md_name))
end
parse(args = ARGV) click to toggle source
# File lib/md_web_browse/cli.rb, line 6
def parse(args = ARGV)
  md = args[0]
  h = md_to_html(md)

  File.open('a.html', 'w') do |f|
    f.write('<meta charset="utf-8">')
    f.write(h)
  end
  
  File.read('a.html')
end