mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-04 13:05:19 +02:00
Make trend public in TimeSeries::Value
This commit is contained in:
parent
11afc94f69
commit
ec68b9bfe7
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ class TimeSeries::Value
|
||||||
include Comparable
|
include Comparable
|
||||||
include ActiveModel::Validations
|
include ActiveModel::Validations
|
||||||
|
|
||||||
attr_reader :value, :date, :original
|
attr_reader :value, :date, :original, :trend
|
||||||
|
|
||||||
validates :date, presence: true
|
validates :date, presence: true
|
||||||
validate :value_must_be_of_known_type
|
validate :value_must_be_of_known_type
|
||||||
|
@ -30,7 +30,7 @@ class TimeSeries::Value
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
attr_reader :series, :trend
|
attr_reader :series
|
||||||
|
|
||||||
def parse_object(obj)
|
def parse_object(obj)
|
||||||
if obj.is_a?(Hash)
|
if obj.is_a?(Hash)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue