mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-04 21:15:19 +02:00
Remove object parsing in TimeSeries::Value
We're only every passing hashes
This commit is contained in:
parent
31caf7056d
commit
ee920f359c
3 changed files with 10 additions and 25 deletions
|
@ -49,8 +49,8 @@ class TimeSeries
|
|||
private
|
||||
def initialize_values(data)
|
||||
[ nil, *data ].each_cons(2).map do |previous, current|
|
||||
TimeSeries::Value.new current,
|
||||
previous: (TimeSeries::Value.new(previous) if previous),
|
||||
TimeSeries::Value.new **current,
|
||||
previous_value: previous.try(:[], :value),
|
||||
series: self
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue