lib/html2rss/attribute_post_processors/template.rb in html2rss-0.12.0 vs lib/html2rss/attribute_post_processors/template.rb in html2rss-0.13.0

- old
+ new

@@ -31,11 +31,11 @@ # # Would return: # 'Product (23,42€)' class Template < Base def self.validate_args!(value, context) - assert_type value, String, :value + assert_type value, String, :value, context: string = context[:options]&.dig(:string).to_s raise InvalidType, 'The `string` template is absent.' if string.empty? end @@ -72,12 +72,12 @@ # Formats a string using methods. # # @return [String] # @deprecated Use %<id>s formatting instead. Will be removed in version 1.0.0. See README / Dynamic parameters. def format_string_with_methods - warn '[DEPRECATION] This method of using params is deprecated and \ - support for it will be removed in version 1.0.0.\ - Please use dynamic parameters (i.e. %<id>s, see README.md) instead.' + Log.warn '[DEPRECATION] This method of using params is deprecated and \ + support for it will be removed in version 1.0.0.\ + Please use dynamic parameters (i.e. %<id>s, see README.md) instead.' string % methods end ##