File Coverage

lib/Finance/Alpaca/Struct/Bar.pm
Criterion Covered Total %
statement 30 30 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 40 40 100.0


line stmt bran cond sub pod time code
1             package Finance::Alpaca::Struct::Bar 0.9902 {
2 1     1   7 use strictures 2;
  1         6  
  1         37  
3 1     1   171 use feature 'signatures';
  1         2  
  1         59  
4 1     1   5 no warnings 'experimental::signatures';
  1         1  
  1         42  
5             #
6 1     1   5 use Type::Library 0.008 -base, -declare => qw[Bar];
  1         20  
  1         6  
7 1     1   987 use Type::Utils;
  1         8405  
  1         13  
8 1     1   1601 use Types::Standard qw[Bool Enum Int Num Ref Str];
  1         2  
  1         5  
9 1     1   1362 use Types::TypeTiny 0.004 StringLike => { -as => "Stringable" };
  1         26  
  1         6  
10             class_type Bar, { class => __PACKAGE__ };
11             coerce( Bar, from Ref() => __PACKAGE__ . q[->new($_)] );
12             #
13 1     1   347 use Moo;
  1         5  
  1         8  
14 1     1   407 use lib './lib';
  1         2  
  1         8  
15 1     1   563 use Finance::Alpaca::Types;
  1         2  
  1         10  
16             has timestamp => ( is => 'ro', isa => Timestamp, required => 1, init_arg => 't', coerce => 1 );
17             has open => ( is => 'ro', isa => Num, required => 1, init_arg => 'o' );
18             has high => ( is => 'ro', isa => Num, required => 1, init_arg => 'h' );
19             has low => ( is => 'ro', isa => Num, required => 1, init_arg => 'l' );
20             has close => ( is => 'ro', isa => Num, required => 1, init_arg => 'c' );
21             has volume => ( is => 'ro', isa => Int, required => 1, init_arg => 'v' );
22             has symbol => ( is => 'ro', isa => Str, predicate => 1, init_arg => 'S' ); # If from stream
23              
24             }
25             1;
26             __END__