Class: Markun::Core
- Inherits:
-
Object
- Object
- Markun::Core
- Defined in:
- lib/markun_core.rb
Overview
Markun Core
Constant Summary collapse
- MARKUN_FILE =
'Markunfile'- MARKUN_TEMPLATE =
<<-EOS # encoding: utf-8 # have menu or not # have_menu allow only String # have_menu's default value => "false" have_menu "false" EOS
- HTML_TEMPLATE =
<<-EOS <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title><%=title%></title> <link href="markdown.css" rel="stylesheet" /> </head> <body> <%=menu%> <%=contents%> </body> </html> EOS
Instance Method Summary collapse
-
#execute ⇒ Object
execute markdown convert.
-
#init ⇒ Object
generate Markunfile to current directory.
Instance Method Details
#execute ⇒ Object
execute markdown convert
42 43 44 45 46 47 |
# File 'lib/markun_core.rb', line 42 def execute src = read_dsl dsl = Markun::Dsl.new dsl.instance_eval src convert_markdown_to_html dsl.markun. end |
#init ⇒ Object
generate Markunfile to current directory.
37 38 39 |
# File 'lib/markun_core.rb', line 37 def init File.open(MARKUN_FILE, 'w') { |f|f.puts MARKUN_TEMPLATE } end |