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:
-
- {base/chains#end}
- {base/chains#destroy}
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:
-
- {base/chains#end}
- {base/chains#destroy}
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.