Module: Hallon::Observable::Toplist

Included in:
Toplist
Defined in:
lib/hallon/observable/toplist.rb

Overview

Callbacks related to the Toplist object.

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/toplist.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/toplist.rb', line 12

def initialize_callbacks
  callback_for(:load)
end

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

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

Examples:

listening to this callback

toplist.on(:load) do
  puts "the toplist has loaded!"
end

Yields:

  • []


24
25
26
# File 'lib/hallon/observable/toplist.rb', line 24

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