Class: Markview::Application
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Markview::Application
- Defined in:
- lib/markview.rb
Class Method Summary collapse
-
.markdown_me ⇒ Object
Renders the html using GitHub::Markup.
Class Method Details
.markdown_me ⇒ Object
Renders the html using GitHub::Markup
15 16 17 18 19 20 21 22 |
# File 'lib/markview.rb', line 15 def self.markdown_me ARGV[0] ||= Dir.glob("README*")[0] begin GitHub::Markup.render(ARGV[0], File.read(ARGV[0])) rescue Errno::ENOENT raise LoadError, "Failed to open document. Please specify a file."; exit end end |