Module: Hallon::Observable::Image
- Included in:
- Image
- Defined in:
- lib/hallon/observable/image.rb
Overview
Callbacks related to Image objects.
Class Method Summary collapse
-
.extended(other) ⇒ Object
Includes Hallon::Observable for you.
Instance Method Summary collapse
-
#initialize_callbacks ⇒ Method
protected
Load callback.
-
#load_callback(pointer, userdata) { ... } ⇒ Object
protected
This callback is fired when the Image object is fully loaded.
Class Method Details
.extended(other) ⇒ Object
Includes Hallon::Observable for you.
5 6 7 |
# File 'lib/hallon/observable/image.rb', line 5 def self.extended(other) other.send(:include, Hallon::Observable) end |
Instance Method Details
#initialize_callbacks ⇒ Method (protected)
Returns load callback.
12 13 14 |
# File 'lib/hallon/observable/image.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.
25 26 27 |
# File 'lib/hallon/observable/image.rb', line 25 def load_callback(pointer, userdata) trigger(pointer, :load) end |