Class MusicExtras::AccessorData
In: lib/musicextras/accessordata.rb
Parent: Object

AccessorData holds information to be passed between a plugin and the class it is extending. When a plugin registers itself with a class, it sends an AccessorData instance to the class.

Methods

new   run  

Attributes

accessor  [RW]  A Symbol of the method in @plugin that will actually fetch the data Eg: :get_lyrics
cache_path  [RW]  The path used to load and save the cached data (see Cache)
plugin  [RW]  Instance of plugin that is registering itself. Usually you will want to pass in ‘self’

Public Class methods

plugin
Plugin instance for this accessor (usually ‘self’)
accessor
The method that fetches the data (eg: :get_lyrics)
cache_path
Path used to load and save cached data

Public Instance methods

Runs the fetch method (@plugin) for this accessor, returning whatever that method returns.

caller
Parameter to pass to fetch method. Should always be the class
         that called run

[Validate]