struct

Portfolio::Asset

Inherits YAML::Serializable < Struct < Value < Object

Constructors

new(amount : BigDecimal, currency : Money::Currency, description : String | Nil = nil)
Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Instance methods

amount
clone
Source
copy_with(amount _amount = @amount, currency _currency = @currency, description _description = @description)
Source
currency
description
exchanged

Returns value exchanged to Money.default_currency.

Source
value

Returns value of this asset as a Money object made from amount and currency.

Source