struct DynamicMint
- DynamicMint
- Struct
- Value
- Object
Defined in:
math/dynamic_mint.crConstructors
Class Method Summary
Instance Method Summary
- #*(v)
- #**(exponent : Int)
- #+(v)
- #+
- #-(v)
- #-
- #/(v)
- #//(v)
- #<(other)
- #<=(other)
- #==(v : self)
-
#==(v)
Returns
true
if this struct is equal to other. - #>(other)
- #>=(other)
- #abs
- #abs2
-
#inspect(io : IO) : Nil
Appends this struct's name and instance variables names and values to the given IO.
- #inv
- #pred
- #succ
- #to_i64 : Int64
-
#to_s(io : IO) : Nil
Same as
#inspect(io)
. - #value : Int32
Constructor Detail
Class Method Detail
Instance Method Detail
def ==(v)
#
Description copied from struct Struct
Returns true
if this struct is equal to other.
Both structs's instance vars are compared to each other. Thus, two structs are considered equal if each of their instance variables are equal. Subclasses should override this method to provide specific equality semantics.
struct Point
def initialize(@x : Int32, @y : Int32)
end
end
p1 = Point.new 1, 2
p2 = Point.new 1, 2
p3 = Point.new 3, 4
p1 == p2 # => true
p1 == p3 # => false
def inspect(io : IO) : Nil
#
Description copied from struct Struct
Appends this struct's name and instance variables names and values to the given IO.
struct Point
def initialize(@x : Int32, @y : Int32)
end
end
p1 = Point.new 1, 2
p1.to_s # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"