class MonetaryValue
- MonetaryValue
- Reference
- Object
Included Modules
- YAML::Serializable
Defined in:
classes/monetary_value.crConstructors
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(value_in_cents : Int64, positive : Bool = true)
Class Method Summary
Instance Method Summary
- #+(other : MonetaryValue)
- #<=>(other : MonetaryValue)
- #negative
- #positive : Bool
- #positive=(positive : Bool)
- #signed_cents
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
- #value_in_cents : Int64
- #value_in_cents=(value_in_cents : Int64)
Constructor Detail
Class Method Detail
Instance Method Detail
def to_s(io : IO)
#
Description copied from class Reference
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>