Skip to content

Documentation


Documentation / @blazetrails/activemodel / AttributeMethods / ClassMethods

Variable: ClassMethods ​

const ClassMethods: { aliasAttribute: void; aliasAttributeMethodDefinition: void; aliasesByAttributeName: Hash<string, string[]>; attributeAlias: string | undefined; attributeMethodAffix: void; attributeMethodPrefix: void; attributeMethodSuffix: void; defineAttributeMethod: void; defineAttributeMethodPattern: void; defineAttributeMethods: void; eagerlyGenerateAliasAttributeMethods: void; generateAliasAttributeMethods: void; isAttributeAlias: boolean; undefineAttributeMethods: void; }

Defined in: packages/activemodel/lib/attribute-methods.ts:156

Type Declaration ​

aliasAttribute() ​

aliasAttribute(this, newName, oldName): void

Parameters ​

ParameterType
thisClassMethodsHost
newNamestring
oldNamestring

Returns ​

void

aliasAttributeMethodDefinition() ​

aliasAttributeMethodDefinition(this, codeGenerator, pattern, newName, oldName): void

Parameters ​

ParameterType
thisClassMethodsHost
codeGeneratorCodeGenerator
patternAttributeMethodPattern
newNamestring
oldNamestring

Returns ​

void

aliasesByAttributeName() ​

aliasesByAttributeName(this): Hash<string, string[]>

Parameters ​

ParameterType
thisClassMethodsHost

Returns ​

Hash<string, string[]>

Invented Arm ​

if — PERMANENT

attributeAlias() ​

attributeAlias(this, name): string | undefined

Parameters ​

ParameterType
thisClassMethodsHost
namestring

Returns ​

string | undefined

attributeMethodAffix() ​

attributeMethodAffix(this, ...affixes): void

Parameters ​

ParameterType
thisClassMethodsHost
...affixes{ parameters?: string | false | null; prefix: string; suffix: string; }[]

Returns ​

void

attributeMethodPrefix() ​

attributeMethodPrefix(this, ...prefixes): void

Parameters ​

ParameterType
thisClassMethodsHost
...prefixesstring[] | [...prefixes: string[], { parameters?: string | false | null; }]

Returns ​

void

attributeMethodSuffix() ​

attributeMethodSuffix(this, ...suffixes): void

Parameters ​

ParameterType
thisClassMethodsHost
...suffixesstring[] | [...suffixes: string[], { parameters?: string | false | null; }]

Returns ​

void

defineAttributeMethod() ​

defineAttributeMethod(this, attrName, options?): void

Parameters ​

ParameterType
thisClassMethodsHost
attrNamestring
options{ _owner?: Module<Record<never, never>> | CodeGenerator; as?: string; }
options._owner?Module<Record<never, never>> | CodeGenerator
options.as?string

Returns ​

void

defineAttributeMethodPattern() ​

defineAttributeMethodPattern(this, pattern, attrName, __namedParameters): void

Parameters ​

ParameterType
thisClassMethodsHost
patternAttributeMethodPattern
attrNamestring
__namedParameters{ as: string; override?: boolean; owner: CodeGenerator; }
__namedParameters.asstring
__namedParameters.override?boolean
__namedParameters.ownerCodeGenerator

Returns ​

void

Invented Arm ​

if — PERMANENT

Invented Arm ​

answersWithAMethod — PERMANENT

defineAttributeMethods() ​

defineAttributeMethods(this, ...attrNames): void

Parameters ​

ParameterType
thisClassMethodsHost
...attrNamesstring[]

Returns ​

void

eagerlyGenerateAliasAttributeMethods() ​

eagerlyGenerateAliasAttributeMethods(this, newName, oldName): void

Parameters ​

ParameterType
thisClassMethodsHost
newNamestring
oldNamestring

Returns ​

void

generateAliasAttributeMethods() ​

generateAliasAttributeMethods(this, codeGenerator, newName, oldName): void

Parameters ​

ParameterType
thisClassMethodsHost
codeGeneratorCodeGenerator
newNamestring
oldNamestring

Returns ​

void

isAttributeAlias() ​

isAttributeAlias(this, newName): boolean

Parameters ​

ParameterType
thisClassMethodsHost
newNamestring

Returns ​

boolean

undefineAttributeMethods() ​

undefineAttributeMethods(this): void

Parameters ​

ParameterType
thisClassMethodsHost

Returns ​

void