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 }