Home Reference Source
public class | source

EasyGoverness

Extends:

hookies~HooksPubSubBaseObjectHeadGoverness → EasyGoverness

Very easy governess who lets everything happen unguarded.

Constructor Summary

Public Constructor
public

constructor(args: ...*)

Member Summary

Public Members
public

Inherited Summary

From class PubSub
public

trigger(name: *, args: ...*): *

Trigger all events synchronously by default

public

triggerAsync(args: ...*): *

Trigger asynchronously

From class HeadGoverness
public get

The getter of unguarded property.

public set

The setter of unguarded property.

public

rules: *

public

addRule(rules: ...*): *

public

doUnguarded(callback: *, context: *): *

Perform some stuff unguarded

public

getRules(type: *): *

public

governed(callback: *, args: *[], callingContext: *): *

Watch over some child action.

public

guard(action: *, args: ...*): *

Throws an error if child is not allowed to do some action

public

The governess is empty when no rules have been defined

public

isAllowed(action: *, args: ...*): boolean

Returns true if child is allowed to perform some action

public

isGuarded(): *

public

isNotAllowed(args: ...*): *

Returns false if child is allowed to perform some action

public
public

learnRules(perimeter: *): *

Public Constructors

public constructor(args: ...*) source

Override:

HeadGoverness#constructor

Params:

NameTypeAttributeDescription
args ...*

Public Members

public unguarded: boolean source

Override:

HeadGoverness#unguarded