Documentation / @blazetrails/activemodel / AttributeMethods / ClassMethods
Variable: ClassMethods
constClassMethods: {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
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
newName | string |
oldName | string |
Returns
void
aliasAttributeMethodDefinition()
aliasAttributeMethodDefinition(
this,codeGenerator,pattern,newName,oldName):void
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
codeGenerator | CodeGenerator |
pattern | AttributeMethodPattern |
newName | string |
oldName | string |
Returns
void
aliasesByAttributeName()
aliasesByAttributeName(
this):Hash<string,string[]>
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
Returns
Hash<string, string[]>
Invented Arm
if — PERMANENT
attributeAlias()
attributeAlias(
this,name):string|undefined
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
name | string |
Returns
string | undefined
attributeMethodAffix()
attributeMethodAffix(
this, ...affixes):void
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
...affixes | { parameters?: string | false | null; prefix: string; suffix: string; }[] |
Returns
void
attributeMethodPrefix()
attributeMethodPrefix(
this, ...prefixes):void
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
...prefixes | string[] | [...prefixes: string[], { parameters?: string | false | null; }] |
Returns
void
attributeMethodSuffix()
attributeMethodSuffix(
this, ...suffixes):void
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
...suffixes | string[] | [...suffixes: string[], { parameters?: string | false | null; }] |
Returns
void
defineAttributeMethod()
defineAttributeMethod(
this,attrName,options?):void
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
attrName | string |
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
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
pattern | AttributeMethodPattern |
attrName | string |
__namedParameters | { as: string; override?: boolean; owner: CodeGenerator; } |
__namedParameters.as | string |
__namedParameters.override? | boolean |
__namedParameters.owner | CodeGenerator |
Returns
void
Invented Arm
if — PERMANENT
Invented Arm
answersWithAMethod — PERMANENT
defineAttributeMethods()
defineAttributeMethods(
this, ...attrNames):void
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
...attrNames | string[] |
Returns
void
eagerlyGenerateAliasAttributeMethods()
eagerlyGenerateAliasAttributeMethods(
this,newName,oldName):void
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
newName | string |
oldName | string |
Returns
void
generateAliasAttributeMethods()
generateAliasAttributeMethods(
this,codeGenerator,newName,oldName):void
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
codeGenerator | CodeGenerator |
newName | string |
oldName | string |
Returns
void
isAttributeAlias()
isAttributeAlias(
this,newName):boolean
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
newName | string |
Returns
boolean
undefineAttributeMethods()
undefineAttributeMethods(
this):void
Parameters
| Parameter | Type |
|---|---|
this | ClassMethodsHost |
Returns
void