Permalink
Browse files

extract Glorify::Helpers

  • Loading branch information...
1 parent 862d695 commit 01d4df6d30ffb0a1ab7ab5b81c9e92cc0924c7ee @zzak committed Dec 4, 2012
Showing with 11 additions and 7 deletions.
  1. +1 −7 lib/glorify.rb
  2. +10 −0 lib/glorify/helpers.rb
View
8 lib/glorify.rb
@@ -4,16 +4,10 @@
require "glorify/version"
require "glorify/renderer"
require "glorify/template"
+require "glorify/helpers"
module Sinatra
module Glorify
- module Helpers
- def glorify text
- Redcarpet::Markdown.new(Glorify::Renderer.new,
- Glorify::EXTENSIONS).render(text)
- end
- end
-
def self.registered(app)
app.set :glorify_extensions, Glorify::EXTENSIONS
app.helpers Glorify::Helpers
View
10 lib/glorify/helpers.rb
@@ -0,0 +1,10 @@
+module Sinatra
+ module Glorify
+ module Helpers
+ def glorify text
+ Redcarpet::Markdown.new(Glorify::Renderer.new,
+ Glorify::EXTENSIONS).render(text)
+ end
+ end
+ end
+end

0 comments on commit 01d4df6

Please sign in to comment.