« blib/lib/Finance/Robinhood/Options/Instrument/Historicals.pm
↑ Summary
blib/lib/Finance/Robinhood/Options/Event.pm »
| 1 | package Finance::Robinhood::Options::Instrument::Historicals::DataPoint; | ||
| 2 | 3 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | # | ||
| 4 | 3 | has [qw[close_price interpolated open_price session volume]] => ( is => 'ro' ); | |
| 5 | has 'begins_at' => ( | ||
| 6 | is => 'ro', | ||
| 7 | coerce => sub { | ||
| 8 | 0 | ▶ | $_[0] =~ s'Z$''; |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 9 | |||
| 10 | # BUG: DateTime::Tiny cannot handle sub-second values. | ||
| 11 | 0 | $_[0] =~ s'\..+$''; | |
| 12 | 0 | DateTime::Tiny->from_string( $_[0] ); | |
| 13 | } | ||
| 14 | 3 | ); | |
| 15 | 3 | 1; | |