summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/Colors.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-05-31 04:51:29 -0500
committerJesse Luehrs <doy@tozt.net>2013-05-31 04:51:29 -0500
commit84640f1b3b402d2a64a5005d757f7171df2d658d (patch)
tree4c916aeffe0cecc9049400592a809f6e2b697135 /lib/Reply/Plugin/Colors.pm
parentcf4edf5661ed8cfaa392e5ee63b0d75a70ac0c87 (diff)
downloadreply-84640f1b3b402d2a64a5005d757f7171df2d658d.tar.gz
reply-84640f1b3b402d2a64a5005d757f7171df2d658d.zip
add some configuration to a couple plugins
Diffstat (limited to 'lib/Reply/Plugin/Colors.pm')
-rw-r--r--lib/Reply/Plugin/Colors.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Reply/Plugin/Colors.pm b/lib/Reply/Plugin/Colors.pm
index 199d41e..8b68119 100644
--- a/lib/Reply/Plugin/Colors.pm
+++ b/lib/Reply/Plugin/Colors.pm
@@ -8,11 +8,12 @@ use Term::ANSIColor;
sub new {
my $class = shift;
+ my %opts = @_;
my $self = $class->SUPER::new(@_);
- $self->{error} = 'red';
- $self->{warning} = 'yellow';
- $self->{result} = 'green';
+ $self->{error} = $opts{error} || 'red';
+ $self->{warning} = $opts{warning} || 'yellow';
+ $self->{result} = $opts{result} || 'green';
return $self;
}