In Files

Parent

Methods

Files

Class/Module Index [+]

Quicksearch

MPD::Song

Song

This class is a glorified Hash used to represent a song
You can access the various fields of a song (such as title) by
either the normal hash method (song['title']) or by using
the field as a method name (song.title).

If the field doesn't exist or isn't set, nil will be returned

Public Instance Methods

method_missing(m, *a) click to toggle source
# File lib/librmpd.rb, line 191
def method_missing(m, *a)
    key = m.to_s
    if key =~ /=$/
        self[$`] = a[0]
    elsif a.empty?
        self[key]
    else
        raise NoMethodError, "#{m}"
    end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.