Class: EasyMailPreview::Mailer::Method

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_mail_preview.rb

Defined Under Namespace

Classes: Argument

Instance Method Summary collapse

Constructor Details

#initialize(action_mailer, method_symbol) ⇒ Method

Returns a new instance of Method.



31
32
33
# File 'lib/easy_mail_preview.rb', line 31

def initialize(action_mailer, method_symbol)
  @action_mailer, @method_symbol = action_mailer, method_symbol
end

Instance Method Details

#argumentsObject



35
36
37
38
# File 'lib/easy_mail_preview.rb', line 35

def arguments
  method = @action_mailer.instance_method(@method_symbol)
  method.parameters.map { |tuple| Argument.new(tuple) }
end

#nameObject



40
41
42
# File 'lib/easy_mail_preview.rb', line 40

def name
  @method_symbol
end