Module: Hallon::Observable::Post

Included in:
User::Post
Defined in:
lib/hallon/observable/post.rb

Overview

Callbacks related to User::Post 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/post.rb', line 5

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

Instance Method Details

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

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

Examples:

listening to this callback

post = user.post(track)
post.on(:complete) do
  puts "ze user be havin’ sum posts"
end

Yields:

  • []



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

def complete_callback(pointer, userdata)
  trigger(pointer, :complete)
end

#initialize_callbacksMethod (protected)

Returns complete callback.

Returns:

  • (Method)

    complete callback



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

def initialize_callbacks
  callback_for(:complete)
end