module Rodimus::Observing

Public Instance Methods

on_notify(subject, event_type) click to toggle source
# File lib/rodimus/observing.rb, line 4
def on_notify(subject, event_type)
  discovered_hooks(event_type).each do |hook|
    self.send(hook)
  end
end

Private Instance Methods

discovered_hooks(matcher) click to toggle source
# File lib/rodimus/observing.rb, line 12
def discovered_hooks(matcher)
  methods.grep(/^#{matcher}/)
end