Module: Hallon::Observable::ArtistBrowse

Included in:
ArtistBrowse
Defined in:
lib/hallon/observable/artist_browse.rb

Overview

Callbacks related to ArtistBrowse objects.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(other) ⇒ Object

Includes Hallon::Observable for you.


5
6
7
# File 'lib/hallon/observable/artist_browse.rb', line 5

def self.extended(other)
  other.send(:include, Hallon::Observable)
end

Instance Method Details

#initialize_callbacksMethod (protected)

Returns load callback

Returns:

  • (Method)

    load callback


12
13
14
# File 'lib/hallon/observable/artist_browse.rb', line 12

def initialize_callbacks
  callback_for(:load)
end

#load_callback(pointer, userdata) { ... } ⇒ Object (protected)

This callback is fired when the ArtistBrowse object is fully loaded.

Examples:

listening to this callback

browse = ArtistBrowse.new(album)
browse.on(:load) do
  puts "Artist browser has loaded!"
end

Yields:

  • []


25
26
27
# File 'lib/hallon/observable/artist_browse.rb', line 25

def load_callback(pointer, userdata)
  trigger(pointer, :load)
end