Method: Hallon::Observable#has_callback?

Defined in:
lib/hallon/observable.rb

#has_callback?(name) ⇒ Boolean

Returns true if a callback with name exists.

Parameters:

  • name (#to_s)

Returns:

  • (Boolean)

    true if a callback with name exists.



126
127
128
# File 'lib/hallon/observable.rb', line 126

def has_callback?(name)
  self.class.respond_to?("#{name}_callback", true)
end