base

base

The base of all classes in the system, this is one of the few pure "classes" in core the of the system. It is a
pretty clean little class whose primary purpose is to surface the composition chains and a basis for storing
options on mixin and subclass instances. Options are handled at the instance rather than the prototype level
so that multiple instances don't compete for default values.

Constructor

new base()

Source:

Extends

Members

close

Source:
Inherited From:
See:

The close method asks an object to shut itself down in a way that will allow it to be reopened, unlike the
end method which will call the destroy method which should make the object unusable, but also
devoid of all resources whereas close may still keep some resources open.

Heading 1 Heading 2 Heading 3
Bar Food This is a table

This uses the before chain which means the last one defined in the first one destroyed

open

Source:
Inherited From:
See:

If you are using the open/close paradigm for an object that can kind of go dormant on base/chains#close and can be "reopened"
again later, here is where the "open" code will go.

This used the after chain which means that the first one defined is the first one destroyed.

Methods

addDefaultOptions(options)

Source:
See:

Add a default option to a class. The default options are only set if there is not already a
value for the option.

Parameters:
Name Type Description
options hash

A hash of options you want to set

addOptions(options)

Source:
See:

Add an option to a class. If any members of the hash already exist in this.options, they will be overwritten.

Parameters:
Name Type Description
options hash

A hash of options you want to set

destroy()

Source:
Overrides:
  • base/chains#destroy
See:

Called when it is time to get rid of all of your instance level references and objects and events. You can
define this method on your own classes without having to call the superclass instance. It is called by
instance.end() automatically

end()

Source:
Overrides:
See:

Call this to close your object and dispose of all maintained resources. You can define this method on your
own classes without having to call the superclass instance, however it is reccomended that you put
all disposal code in destroy(). You must be disciplined about calling this on your instances.