- Parent Namespace
- SleepingKingStudios::Tools::Toolbox::HeritableData
- Defined In
- lib/sleeping_king_studios/tools/toolbox/heritable_data.rb
Table Of Contents
Overview
Methods prepended onto the singleton class when including HeritableData.
Back To Top
Instance Methods
#<(other) => true, false, nil
Compares self and other.
Parameters
- other (Object) — the object to compare.
Returns
- (true) — if self is a subclass of other, or if self inherits Data
members and methods from other.
- (false) — if self and other are the same class, if other is a
subclass of self, or if other inherits Data members and methods from
self.
- (nil) — if none of the above is true.
#<=(other) => true, false, nil
Compares self and other.
Parameters
- other (Object) — the object to compare.
Returns
- (true) — if self and other are the same class, if self is a
subclass of other, or if self inherits Data members and methods from
other.
- (false) — if other is a subclass of self, or if other inherits
Data members and methods from self.
- (nil) — if none of the above is true.
#<=>(other) => -1, 0, 1, nil
Compares self and other.
Parameters
- other (Object) — the object to compare.
Returns
- (-1) — if self is a subclass of other, or if self inherits Data
members and methods from other.
- (0) — if self and other are the same class.
- (1) — if self is a parent class of other, or if other inherits
Data members and methods from self.
- (nil) — if none of the above is true.
#===(object) => true
Returns
- (true) — if the object is an instance of the data class, or if the
object is an instance of a Data class that inherits members and
methods from self.
#>(other) => true, false, nil
Compares self and other.
Parameters
- other (Object) — the object to compare.
Returns
- (true) — if other is a subclass of other, or if other inherits
Data members and methods from self.
- (false) — if self and other are the same class, if self is a
subclass of other, or if self inherits Data members and methods from
other.
- (nil) — if none of the above is true.
#>=(other) => true, false, nil
Compares self and other.
Parameters
- other (Object) — the object to compare.
Returns
- (true) — if self and other are the same class, if other is a
subclass of other, or if other inherits Data members and methods from
self.
- (false) — if self is a subclass of other, or if self inherits Data
members and methods from other.
- (nil) — if none of the above is true.
#define(*symbols, &) => Object
Defines a new Data class including the members/methods of this class.
The defined data class will include HeritableData, and will be able to
define it’s own Data types using this method.
Parameters
- symbols (Array<Symbol>) — additional Data members to define. Any
members listed here will be appended to the members defined on the
parent Data class.
Yields
- additional methods to define on the new Data class.
Back To Top
Back to
Documentation |
Reference
|
SleepingKingStudios
|
SleepingKingStudios::Tools
|
SleepingKingStudios::Tools::Toolbox
|
SleepingKingStudios::Tools::Toolbox::HeritableData