surprise! Object::Remote!
[scpubgit/DKit.git] / lib / DX / Lib / FS / Observation / FileContent.pm
1 package DX::Lib::FS::Observation::FileContent;
2
3 use DX::Lib::FS::Fact::FileContent;
4 use Moo;
5
6 has path => (is => 'ro', required => 1);
7
8 with 'DX::Lib::FS::Role::RunOn';
9
10 sub run {
11   my ($self) = @_;
12   my $data = $self->_call_guts('file_content');
13   return () unless defined($data);
14   +(file_content => DX::Lib::FS::Fact::FileContent->new(
15     path => $self->path,
16     data => $data
17   ));
18 }
19
20 1;