Skip to content

Documentation


Documentation / @blazetrails/activesupport / Scalar

Class: Scalar ​

Defined in: packages/activesupport/lib/duration.ts:676

Constructors ​

Constructor ​

new Scalar(value): Scalar

Defined in: packages/activesupport/lib/duration.ts:679

Parameters ​

ParameterType
valuenumber

Returns ​

Scalar

Properties ​

equals ​

equals: (this, other) => boolean = cmpEquals

Defined in: packages/activesupport/lib/duration.ts:754

Ruby Comparable#== (vendor/ruby/v3.3.11/compar.c:79 cmp_equal), the one derived operator that does NOT raise: a nil <=> is false, and an identical object is true before <=> is sent at all.

Parameters ​

ParameterType
thisComparable
otherunknown

Returns ​

boolean

No Rails Equivalent ​

PERMANENT — Ruby core Comparable cmp_equal (vendor/ruby/v3.3.11/compar.c:79).


value ​

readonly value: number

Defined in: packages/activesupport/lib/duration.ts:677

Methods ​

coerce() ​

coerce(other): [Scalar, Scalar]

Defined in: packages/activesupport/lib/duration.ts:683

Parameters ​

ParameterType
otherunknown

Returns ​

[Scalar, Scalar]


compareTo() ​

compareTo(other): number | null

Defined in: packages/activesupport/lib/duration.ts:744

Parameters ​

ParameterType
otherunknown

Returns ​

number | null


div() ​

Call Signature ​

div(other): number

Defined in: packages/activesupport/lib/duration.ts:772

Parameters ​
ParameterType
otherDuration
Returns ​

number

Call Signature ​

div(other): Scalar

Defined in: packages/activesupport/lib/duration.ts:773

Parameters ​
ParameterType
otherunknown
Returns ​

Scalar


isVariable() ​

isVariable(): boolean

Defined in: packages/activesupport/lib/duration.ts:687

Returns ​

boolean


minus() ​

Call Signature ​

minus(other): Duration

Defined in: packages/activesupport/lib/duration.ts:722

Parameters ​
ParameterType
otherDuration
Returns ​

Duration

Call Signature ​

minus(other): Scalar

Defined in: packages/activesupport/lib/duration.ts:723

Parameters ​
ParameterType
otherunknown
Returns ​

Scalar


modulo() ​

Call Signature ​

modulo(other): Duration

Defined in: packages/activesupport/lib/duration.ts:782

Parameters ​
ParameterType
otherDuration
Returns ​

Duration

Call Signature ​

modulo(other): Scalar

Defined in: packages/activesupport/lib/duration.ts:783

Parameters ​
ParameterType
otherunknown
Returns ​

Scalar


negate() ​

negate(): Scalar

Defined in: packages/activesupport/lib/duration.ts:740

Returns ​

Scalar


plus() ​

Call Signature ​

plus(other): Duration

Defined in: packages/activesupport/lib/duration.ts:708

Parameters ​
ParameterType
otherDuration
Returns ​

Duration

Call Signature ​

plus(other): Scalar

Defined in: packages/activesupport/lib/duration.ts:709

Parameters ​
ParameterType
otherunknown
Returns ​

Scalar


times() ​

Call Signature ​

times(other): Duration

Defined in: packages/activesupport/lib/duration.ts:756

Parameters ​
ParameterType
otherDuration
Returns ​

Duration

Call Signature ​

times(other): Scalar

Defined in: packages/activesupport/lib/duration.ts:757

Parameters ​
ParameterType
otherunknown
Returns ​

Scalar


toF() ​

toF(): number

Defined in: packages/activesupport/lib/duration.ts:695

Returns ​

number


toI() ​

toI(): number

Defined in: packages/activesupport/lib/duration.ts:691

Returns ​

number


toString() ​

toString(): string

Defined in: packages/activesupport/lib/duration.ts:699

Returns ​

string


valueOf() ​

valueOf(): number

Defined in: packages/activesupport/lib/duration.ts:704

Returns ​

number

No Rails Equivalent ​

PERMANENT