Class: Mdown::App
- Inherits:
-
Object
- Object
- Mdown::App
- Defined in:
- lib/mdown/app.rb
Instance Method Summary collapse
-
#initialize(file) ⇒ App
constructor
A new instance of App.
- #preview! ⇒ Object
Constructor Details
#initialize(file) ⇒ App
Returns a new instance of App.
3 4 5 6 |
# File 'lib/mdown/app.rb', line 3 def initialize(file) check_file! file @file = file end |
Instance Method Details
#preview! ⇒ Object
8 9 10 11 |
# File 'lib/mdown/app.rb', line 8 def preview! preview = Maruku.new(File.open(@file).read).to_html exec "echo \"#{preview}\" | bcat" end |