Class MyHash
In: lib.rb
Parent: Hash

Class for storing collection data and mapping names to ids or urls.

Key is the name of song / album / artist / genre. Value is id or url of song / album /artist / genre, or array of ids or url.

Methods

[]   []=  

Public Instance methods

Get record stored with key key.

[Source]

# File lib.rb, line 97
        def [](key)
                super(key)
        end

Insert value into record with key key

[Source]

# File lib.rb, line 81
        def []=(key,value)
                if has_key?(key)
                        item = self.[](key)
                        if item.class == Array
                                item.push(value)
                        else
                                super(key,[item, value])
                        end
                else
                        super(key,value)
                end
        end

[Validate]