diff options
Diffstat (limited to 'lib/Bot/Games/Trait/Class/Formatted.pm')
-rw-r--r-- | lib/Bot/Games/Trait/Class/Formatted.pm | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/Bot/Games/Trait/Class/Formatted.pm b/lib/Bot/Games/Trait/Class/Formatted.pm deleted file mode 100644 index 6c3092a..0000000 --- a/lib/Bot/Games/Trait/Class/Formatted.pm +++ /dev/null @@ -1,26 +0,0 @@ -package Bot::Games::Trait::Class::Formatted; -use Bot::Games::OO::Role; - -has default_formatters => ( - metaclass => 'Collection::ImmutableHash', - is => 'ro', - isa => 'HashRef[CodeRef]', - builder => '_build_default_formatters', - provides => { - get => 'formatter_for', - exists => 'has_formatter', - keys => 'formattable_tcs', - }, -); - -sub _build_default_formatters { - { - 'ArrayRef' => sub { join ', ', @{ shift() } }, - 'Bool' => sub { return shift() ? 'true' : 'false' }, - 'Object' => sub { shift() . "" }, - } -} - -no Bot::Games::OO::Role; - -1; |