Sha256: 6013370afe3910a9932d2ecebf75ced951ce5d1a5203a8040a8151a4423da990
Contents?: true
Size: 367 Bytes
Versions: 2
Compression:
Stored size: 367 Bytes
Contents
module BestBoyController module InstanceMethods def best_boy_event(obj, event) if obj.respond_to?("eventable?") if event.present? obj.trigger_custom_event(event) else raise "There is no event to trigger." end else raise "#{obj.class.to_s} is not a best_boy eventable!" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
best_boy-0.0.3 | app/controllers/best_boy_controller.rb |
best_boy-0.0.2 | app/controllers/best_boy_controller.rb |