docify 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/docify.rb +11 -0
  2. data/lib/docify/version.rb +1 -1
  3. metadata +2 -2
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Docify
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '1.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: docify
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.3
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-28 00:00:00 -05:00
13
+ date: 2011-06-29 00:00:00 -05:00
14
14
  default_executable: docify
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency