summaryrefslogtreecommitdiff
path: root/lib/Enigmatic/Reflector.pm
blob: b9371dddf2edbfcf28337ad38e5297b4d2dd6ea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package Enigmatic::Reflector; 
use DAKKAR::p 'class';
use Enigmatic::Types qw(ReflWiringMap Letter);
 
has wiring => (
    is => 'ro',
    isa => ReflWiringMap,
    coerce => 1,
);
 
with 'Enigmatic::Role::WithWiring';
 
sub map {
    my $self = shift;
    my ($letter) = pos_validated_list(
        \@_,
        isa => Letter },
    );
 
    return $self->wiring->at($letter);
}