Skip to content

Documentation


Documentation / @blazetrails/activesupport / InheritableOptions

Class: InheritableOptions ​

Defined in: packages/activesupport/lib/ordered-options.ts:212

Extends ​

Extended by ​

Constructors ​

Constructor ​

new InheritableOptions(parent?): InheritableOptions

Defined in: packages/activesupport/lib/ordered-options.ts:217

Parameters ​

ParameterTypeDefault value
parentRecord<string, unknown> | OrderedOptions | nullnull

Returns ​

InheritableOptions

Overrides ​

OrderedOptions.constructor

Properties ​

defaultBlock? ​

protected optional defaultBlock?: (key) => unknown

Defined in: packages/activesupport/lib/ordered-options.ts:13

Parameters ​

ParameterType
keystring

Returns ​

unknown

Inherited from ​

OrderedOptions.defaultBlock


name ​

static name: string = "ActiveSupport::InheritableOptions"

Defined in: packages/activesupport/lib/ordered-options.ts:213

Overrides ​

OrderedOptions.name

Accessors ​

count ​

Get Signature ​

get count(): number

Defined in: packages/activesupport/lib/ordered-options.ts:168

Returns ​

number

Inherited from ​

OrderedOptions.count


size ​

Get Signature ​

get size(): number

Defined in: packages/activesupport/lib/ordered-options.ts:164

Returns ​

number

Inherited from ​

OrderedOptions.size

Methods ​

_get() ​

protected _get(key): unknown

Defined in: packages/activesupport/lib/ordered-options.ts:20

Parameters ​

ParameterType
keystring

Returns ​

unknown

Inherited from ​

OrderedOptions._get


clear() ​

clear(): this

Defined in: packages/activesupport/lib/ordered-options.ts:127

Returns ​

this

Inherited from ​

OrderedOptions.clear


delete() ​

delete(key): unknown

Defined in: packages/activesupport/lib/ordered-options.ts:121

Parameters ​

ParameterType
keystring

Returns ​

unknown

Inherited from ​

OrderedOptions.delete


dig() ​

dig(key, ...identifiers): unknown

Defined in: packages/activesupport/lib/ordered-options.ts:47

Mirrors dig (ordered_options.rb:45-47), whose super is rb_hash_dig (vendor/ruby/v3.3.11/hash.c:4627): rb_hash_aref for the first key — which is get, so the default block runs — and rb_obj_dig (vendor/ruby/v3.3.11/object.c:3906) for the rest. That loop ends on nil, indexes a Hash through rb_hash_aref and an Array through rb_ary_at — whose index goes through NUM2LONG (vendor/ruby/v3.3.11/array.c:1881-1883), so a String identifier is a TypeError there and not an index — hands the remaining identifiers to an object that answers dig, and otherwise raises no_dig_method's TypeError (object.c:3897-3900). A Ruby Hash is a plain object or a Map in trails, so both take the rb_hash_aref arm.

Parameters ​

ParameterType
keystring
...identifiers(string | number)[]

Returns ​

unknown

Inherited from ​

OrderedOptions.dig


dup() ​

dup(): this

Defined in: packages/activesupport/lib/ordered-options.ts:172

Returns ​

this

Inherited from ​

OrderedOptions.dup


each() ​

each(fn): this

Defined in: packages/activesupport/lib/ordered-options.ts:274

Parameters ​

ParameterType
fn(key, value) => void

Returns ​

this

Overrides ​

OrderedOptions.each


entries() ​

entries(): [string, unknown][]

Defined in: packages/activesupport/lib/ordered-options.ts:140

Returns ​

[string, unknown][]

Inherited from ​

OrderedOptions.entries


equals() ​

equals(other): boolean

Defined in: packages/activesupport/lib/ordered-options.ts:155

Parameters ​

ParameterType
otherunknown

Returns ​

boolean

Inherited from ​

OrderedOptions.equals


fetch() ​

fetch(key, ...rest): unknown

Defined in: packages/activesupport/lib/ordered-options.ts:86

Hash#fetch (vendor/ruby/v3.3.11/hash.c:2176), which OrderedOptions < Hash (ordered_options.rb:32) inherits: the stored value, else the block's or the default's, else KeyError. The default block is not consulted. []= stores key.to_sym (ordered_options.rb:37-43), so data holds each key in its Symbol form and a miss inspects as :name.

Parameters ​

ParameterType
keystring
...rest[] | [unknown]

Returns ​

unknown

Inherited from ​

OrderedOptions.fetch


get() ​

get(key): unknown

Defined in: packages/activesupport/lib/ordered-options.ts:30

Parameters ​

ParameterType
keystring

Returns ​

unknown

Inherited from ​

OrderedOptions.get


inheritableCopy() ​

inheritableCopy(): InheritableOptions

Defined in: packages/activesupport/lib/ordered-options.ts:266

Returns ​

InheritableOptions


inspect() ​

inspect(): string

Defined in: packages/activesupport/lib/ordered-options.ts:237

Returns ​

string

Overrides ​

OrderedOptions.inspect


isExtractableOptions() ​

isExtractableOptions(): boolean

Defined in: packages/activesupport/lib/ordered-options.ts:94

Returns ​

boolean

Inherited from ​

OrderedOptions.isExtractableOptions


isKey() ​

isKey(key): boolean

Defined in: packages/activesupport/lib/ordered-options.ts:254

Parameters ​

ParameterType
keystring

Returns ​

boolean

Overrides ​

OrderedOptions.isKey


isOverridden() ​

isOverridden(key): boolean

Defined in: packages/activesupport/lib/ordered-options.ts:258

Parameters ​

ParameterType
keystring

Returns ​

boolean


key() ​

key(value): string | undefined

Defined in: packages/activesupport/lib/ordered-options.ts:111

Parameters ​

ParameterType
valueunknown

Returns ​

string | undefined

Inherited from ​

OrderedOptions.key


keys() ​

keys(): string[]

Defined in: packages/activesupport/lib/ordered-options.ts:132

Returns ​

string[]

Inherited from ​

OrderedOptions.keys


ownKey() ​

protected ownKey(key): boolean

Defined in: packages/activesupport/lib/ordered-options.ts:250

Parameters ​

ParameterType
keystring

Returns ​

boolean


prettyPrint() ​

prettyPrint(pp): void | Promise<void>

Defined in: packages/activesupport/lib/ordered-options.ts:246

Parameters ​

ParameterType
ppPP

Returns ​

void | Promise<void>


respondToMissing() ​

respondToMissing(name, includePrivate): boolean

Defined in: packages/activesupport/lib/ordered-options.ts:90

Parameters ​

ParameterType
namestring
includePrivateboolean

Returns ​

boolean

Inherited from ​

OrderedOptions.respondToMissing


set() ​

set(key, value): this

Defined in: packages/activesupport/lib/ordered-options.ts:25

Parameters ​

ParameterType
keystring
valueunknown

Returns ​

this

Inherited from ​

OrderedOptions.set


toA() ​

toA(): [string, unknown][]

Defined in: packages/activesupport/lib/ordered-options.ts:270

Returns ​

[string, unknown][]


toH() ​

toH(): Record<string, unknown>

Defined in: packages/activesupport/lib/ordered-options.ts:230

Returns ​

Record<string, unknown>

Overrides ​

OrderedOptions.toH


toHash() ​

toHash(): this

Defined in: packages/activesupport/lib/ordered-options.ts:151

Returns ​

this

No Rails Equivalent ​

PERMANENT

Inherited from ​

OrderedOptions.toHash


toString() ​

toString(): string

Defined in: packages/activesupport/lib/ordered-options.ts:241

Returns ​

string

Overrides ​

OrderedOptions.toString


update() ​

update(otherHash): this

Defined in: packages/activesupport/lib/ordered-options.ts:116

Parameters ​

ParameterType
otherHashRecord<string, unknown>

Returns ​

this

Inherited from ​

OrderedOptions.update


values() ​

values(): unknown[]

Defined in: packages/activesupport/lib/ordered-options.ts:136

Returns ​

unknown[]

Inherited from ​

OrderedOptions.values