lib/shortcode.rb in shortcode-1.2.0 vs lib/shortcode.rb in shortcode-1.2.1

- old
+ new

@@ -10,24 +10,27 @@ rescue LoadError; end class Shortcode # This is providedc for backwards compatibility def self.process(string, additional_attributes=nil) + warn "[DEPRECATION] singleton `Shortcode.process` is deprecated and will be removed in version 2.0. Please create a new instance `Shortcode.new` and call `process` on the instance." singleton.process(string, additional_attributes) end # This is provided for backwards compatibility def self.singleton @instance ||= new end # This is providedc for backwards compatibility def self.setup(&prc) + warn "[DEPRECATION] singleton `Shortcode.setup` is deprecated and will be removed in version 2.0. Please create a new instance `Shortcode.new` and call `setup` on the instance." singleton.setup(&prc) end # This is providedc for backwards compatibility def self.register_presenter(*presenters) + warn "[DEPRECATION] singleton `Shortcode.register_presenter` is deprecated and will be removed in version 2.0. Please create a new instance `Shortcode.new` and call `register_presenter` on the instance." singleton.register_presenter(*presenters) end def process(string, additional_attributes=nil) Shortcode::Processor.new.process(string, configuration, additional_attributes)