Class: Mdown::App

Inherits:
Object
  • Object
show all
Defined in:
lib/mdown/app.rb

Instance Method Summary collapse

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