Home Reference Source
public class | source

Perimeter

Extends:

hookies~HooksPubSubBaseObject → Perimeter

A Perimeter is used to define the places where child can play.

Constructor Summary

Public Constructor
public

constructor(purpose: *, opts: {})

Create new perimeter

Member Summary

Public Members
public

child: *

public

expose: *

public

govern: *

public get

The getter of the governess.

public set

The setter of the governess.

public get

purpose: *

The getter of the purpose.

public set

purpose: *

The setter of the purpose.

public get

sandbox: *

The getter of the sandbox.

public set

sandbox: *

The setter of the sandbox.

Method Summary

Public Methods
public

Return the governess of the perimeter or the governess of it's sandbox

public

getPurpose(): *

Returns purpose of the perimeter.

public

getSandbox(): *

Returns sandbox of the perimeter

public

governed(args: ...*): *

Forward governed call to governess.

public

guard(args: ...*): *

Forward guard call to governess.

public

isAllowed(args: ...*): *

Forward isAllowed call to governess.

public

isNotAllowed(args: ...*): *

Forward isNotAllowed call to governess.

Inherited Summary

From class PubSub
public

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

Trigger all events synchronously by default

public

triggerAsync(args: ...*): *

Trigger asynchronously

Public Constructors

public constructor(purpose: *, opts: {}) source

Create new perimeter

Params:

NameTypeAttributeDescription
purpose *
opts {}
  • optional
  • default: {}

Public Members

public child: * source

public expose: * source

public govern: * source

public get governess: * source

The getter of the governess.

public set governess: * source

The setter of the governess.

public get purpose: * source

The getter of the purpose.

public set purpose: * source

The setter of the purpose. Make sure that name of the purpose is not restricted.

public get sandbox: * source

The getter of the sandbox.

public set sandbox: * source

The setter of the sandbox. Make sure that given sandbox is an instance of Sandbox class.

Public Methods

public getGoverness(): * source

Return the governess of the perimeter or the governess of it's sandbox

Return:

*

public getPurpose(): * source

Returns purpose of the perimeter.

Return:

*

public getSandbox(): * source

Returns sandbox of the perimeter

Return:

*

public governed(args: ...*): * source

Forward governed call to governess.

Params:

NameTypeAttributeDescription
args ...*

Return:

*

public guard(args: ...*): * source

Forward guard call to governess.

Params:

NameTypeAttributeDescription
args ...*

Return:

*

public isAllowed(args: ...*): * source

Forward isAllowed call to governess.

Params:

NameTypeAttributeDescription
args ...*

Return:

*

public isNotAllowed(args: ...*): * source

Forward isNotAllowed call to governess.

Params:

NameTypeAttributeDescription
args ...*

Return:

*