<commit_before>var args = arguments[0] || {};
var timeout = null;
var $container = null;


/*
Methods
*/

exports.hide = function() {
	clearTimeout(timeout);

	$container.animate({
		transform: Ti.UI.create2DMatrix().translate(0, -$container.height),
		duration: 200
	}, function() {
		if (args.view != null) {
			args.view.remove($container);
		} else {
			$container.close();
		}

		if (_.isFunction(args.onClose)) args.onClose();
	});
};


/*
Initialization
*/

if (args.message != null) $.caffeinaToastLabel.text = args.message;
if (args.icon != null) $.caffeinaToastIcon.image = args.icon;<commit_msg>Allow update of notification text.<commit_after>var args = arguments[0] || {};
var timeout = null;
var $container = null;


/*
Methods
*/

exports.hide = function() {
	clearTimeout(timeout);

	$container.animate({
		transform: Ti.UI.create2DMatrix().translate(0, -$container.height),
		duration: 200
	}, function() {
		if (args.view != null) {
			args.view.remove($container);
		} else {
			$container.close();
		}

		if (_.isFunction(args.onClose)) args.onClose();
	});
};

exports.update = function(message)
{
	$.caffeinaToastLabel.text = message;
};


/*
Initialization
*/

if (args.message != null) $.caffeinaToastLabel.text = args.message;
if (args.icon != null) $.caffeinaToastIcon.image = args.icon;
{'fraction_non_alphanumeric': 0.18064024390243902, 'fraction_numerical': 0.009146341463414634, 'mean_word_length': 4.108949416342412, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4784221', 'n_tokens_mistral': 485, 'n_tokens_neox': 447, 'n_words': 87}