Module: OldieRailsModels::Mailer
- Defined in:
- lib/oldie_rails_models/mailer.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/oldie_rails_models/mailer.rb', line 4
def method_missing(method_name, *args)
if method_name =~ /\Adeliver_.+\Z/
send(method_name.to_s.scan(/deliver_(.+)/).flatten.first.to_sym, *args)
else
super
end
end
|
Instance Method Details
#respond_to?(method_name, include_private = false) ⇒ Boolean
12
13
14
15
16
17
18
|
# File 'lib/oldie_rails_models/mailer.rb', line 12
def respond_to?(method_name, include_private = false)
if method_name =~ /\Adeliver_.+\Z/
true
else
super
end
end
|