summaryrefslogtreecommitdiff
path: root/lib/Enigmatic/Reflector.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Enigmatic/Reflector.pm')
-rw-r--r--lib/Enigmatic/Reflector.pm21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Enigmatic/Reflector.pm b/lib/Enigmatic/Reflector.pm
new file mode 100644
index 0000000..b9371dd
--- /dev/null
+++ b/lib/Enigmatic/Reflector.pm
@@ -0,0 +1,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);
+}