Module: EasyResponders
- Defined in:
- lib/easy_responders.rb,
lib/easy_responders/railtie.rb
Defined Under Namespace
Classes: Railtie
Instance Method Summary collapse
Instance Method Details
#responders(*responders) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/easy_responders.rb', line 4 def responders *responders if responders.any? responder_class = Class.new(responder) responders.each do |responder| responder = responder.is_a?(Module) ? responder : "#{responder.to_s.classify}Responder".constantize responder_class.send(:include, responder) end self.responder = responder_class end end |