new Gctax_vec_map(config)
A vector map
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
config |
Object |
Properties
|
- Source:
Methods
(static) is_valid(vec_map) → {boolean}
Validate the structure of a vector map.
Note that this does not validate vector names against the system vocabulary
Parameters:
Name | Type | Description |
---|---|---|
vec_map |
module:gctax_vec_map~Gctax_vec_map | a vector map |
- Source:
Returns:
true if the vector map is valid
- Type
- boolean
add_link(vec_name, data)
Add a new link to this vector map
Parameters:
Name | Type | Description |
---|---|---|
vec_name |
string | the vector to assign to |
data |
any | the data to assign as a link; it should probably be a hash as a string, but that isn't enforced! |
- Source:
get_links(vec_name) → {Array.<any>}
Get all the links associated with a vector in this vector map
Parameters:
Name | Type | Description |
---|---|---|
vec_name |
string | the vector to fetch links for |
- Source:
Returns:
an array of link data associated with vector vec_name
- Type
- Array.<any>