<commit_before>module NotifyBar
	module Helper
	
		def notify_bar opts = {}
			opts.reverse_merge! :flash => :notice,
				:delay => 2000, :animation_speed => 'normal', :close => false			

			html = ''
			
			Array.wrap(opts[:flash]).each do |f|
				if html = flash[f]
					opts[:cls] ||= f.to_s
					break
				end
			end

			unless html.blank?
				javascript_tag do
					notify_bar_js html, opts
				end
			end
			
		end

		def notify_bar_js html, opts = {}
			%($(function () {
					$.notifyBar({
						html: '#{escape_javascript(html)}',
						delay: #{opts[:delay]},
						animationSpeed: "#{opts[:animation_speed]}",
						cls: "#{opts[:cls]}",
						close: #{opts[:close].to_s}
						});
					});
		)
	end

	end
end<commit_msg>notify_bar helper returns blank string instead of nil<commit_after>module NotifyBar
	module Helper
	
		def notify_bar opts = {}
			opts.reverse_merge! :flash => :notice,
				:delay => 2000, :animation_speed => 'normal', :close => false			

			html = ''
			
			Array.wrap(opts[:flash]).each do |f|
				if html = flash[f]
					opts[:cls] ||= f.to_s
					break
				end
			end

			if html.blank?
				''
			else
				javascript_tag do
					notify_bar_js html, opts
				end
			end
			
		end

		def notify_bar_js html, opts = {}
			%($(function () {
					$.notifyBar({
						html: '#{escape_javascript(html)}',
						delay: #{opts[:delay]},
						animationSpeed: "#{opts[:animation_speed]}",
						cls: "#{opts[:cls]}",
						close: #{opts[:close].to_s}
						});
					});
		)
	end

	end
end
{'fraction_non_alphanumeric': 0.1570957095709571, 'fraction_numerical': 0.005280528052805281, 'mean_word_length': 2.469107551487414, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1325638', 'n_tokens_mistral': 724, 'n_tokens_neox': 517, 'n_words': 121}