lib/shortcode.rb in shortcode-0.1.1 vs lib/shortcode.rb in shortcode-0.1.2
- old
+ new
@@ -4,13 +4,12 @@
module Shortcode
extend self
attr_accessor :configuration, :presenters
- @@presenters = {}
+ self.presenters = {}
-
def setup
self.configuration ||= Configuration.new
yield configuration
end
@@ -39,6 +38,8 @@
require 'shortcode/parser'
require 'shortcode/presenter'
require 'shortcode/transformer'
require 'shortcode/tag'
require 'shortcode/exceptions'
-require 'shortcode/railtie' if defined?(Rails)
+require 'shortcode/railtie' if defined?(Rails) && Rails::VERSION::MAJOR >= 3
+
+Shortcode.setup {}