From c1a9deb66e96f901328026a8dae30855595247e1 Mon Sep 17 00:00:00 2001 From: Abdur Rehman Date: Fri, 19 Aug 2016 18:02:22 +0500 Subject: [PATCH] protocol editable now in configuration of dynamic sitemap initializer --- lib/dynamic_sitemaps.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/dynamic_sitemaps.rb b/lib/dynamic_sitemaps.rb index 2b3b376..7df1cdd 100644 --- a/lib/dynamic_sitemaps.rb +++ b/lib/dynamic_sitemaps.rb @@ -111,6 +111,11 @@ def protocol @protocol ||= DEFAULT_PROTOCOL end + def protocol=(new_protocol) + raise ArgumentError, "DynamicSitemaps.protocol can't be blank." if new_protocol.blank? + @protocol = new_protocol.to_s + end + # Resets all instance variables. Used for testing. def reset! instance_variables.each { |var| remove_instance_variable var }