docify 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/docify.rb +11 -0
- data/lib/docify/version.rb +1 -1
- metadata +2 -2
data/lib/docify.rb
CHANGED
@@ -4,3 +4,14 @@ require 'docify/template'
|
|
4
4
|
require 'docify/style'
|
5
5
|
require 'docify/markup'
|
6
6
|
require 'docify/document'
|
7
|
+
|
8
|
+
module Docify
|
9
|
+
# Simply renders content for the markup
|
10
|
+
def self.render(text, format='mardown')
|
11
|
+
if Docify::FORMATS.include?(format.to_s)
|
12
|
+
Docify::Markup.send(format.to_sym, text)
|
13
|
+
else
|
14
|
+
raise ArgumentError, "Invalid markup: #{format}."
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/docify/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: docify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Dan Sosedoff
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-06-
|
13
|
+
date: 2011-06-29 00:00:00 -05:00
|
14
14
|
default_executable: docify
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|