Class: EasyMailPreview::Mailer
- Inherits:
-
Object
- Object
- EasyMailPreview::Mailer
- Defined in:
- lib/easy_mail_preview.rb
Overview
convenience class for introspecting on an ActionMailer class
Defined Under Namespace
Classes: Method
Instance Method Summary collapse
-
#initialize(action_mailer) ⇒ Mailer
constructor
A new instance of Mailer.
- #mail_methods ⇒ Object
- #name ⇒ Object
Constructor Details
#initialize(action_mailer) ⇒ Mailer
Returns a new instance of Mailer.
14 15 16 |
# File 'lib/easy_mail_preview.rb', line 14 def initialize(action_mailer) @action_mailer = action_mailer end |
Instance Method Details
#mail_methods ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/easy_mail_preview.rb', line 18 def mail_methods ( @action_mailer.public_instance_methods - @action_mailer.superclass.public_instance_methods - @action_mailer.included_modules.map(&:instance_methods).flatten.uniq ).map { |method_symbol| Method.new(@action_mailer, method_symbol) } end |
#name ⇒ Object
26 27 28 |
# File 'lib/easy_mail_preview.rb', line 26 def name @action_mailer.name end |