Skip to content

Not an issue per-say, but feature improvement hack I made #6

@jonbarkerlondon

Description

@jonbarkerlondon

...To allow for additional metadata on each item.

enum

I just declared vals = Vector{Tuple{Symbol,Integer,Any}}() - note the Any rather than String.
And added a new method

        function $(esc(:getattributes))(x::$(esc(typename)))
           for (sym, i, str) in $vals
                if i == $(basetype)(x)
                    return str
                end
            end
            return nothing
        end

Great package by the way! Been looking for this for a while but didn't know how to do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions