Class: FactoryScenarios::Mail::Preview
- Inherits:
-
Object
- Object
- FactoryScenarios::Mail::Preview
- Defined in:
- lib/factory_scenarios/mail/preview.rb
Instance Method Summary collapse
- #login_as(&block) ⇒ Object
- #mailer(mailer = nil) ⇒ Object
- #mailer_message ⇒ Object
- #message(message = nil) ⇒ Object
- #message_args(&block) ⇒ Object
- #name(name = nil) ⇒ Object
- #render ⇒ Object
Instance Method Details
#login_as(&block) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/factory_scenarios/mail/preview.rb', line 10 def login_as(&block) if block_given? @login_as = block elsif @login_as @login_as.call *self. end end |
#mailer(mailer = nil) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/factory_scenarios/mail/preview.rb', line 26 def mailer(mailer=nil) if mailer @mailer = mailer else @mailer end end |
#mailer_message ⇒ Object
2 3 4 |
# File 'lib/factory_scenarios/mail/preview.rb', line 2 def mailer.send(, *self.) end |
#message(message = nil) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/factory_scenarios/mail/preview.rb', line 34 def (=nil) if @message = else @message end end |
#message_args(&block) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/factory_scenarios/mail/preview.rb', line 42 def (&block) if block_given? @message_args = block else @_args ||= @message_args.call end end |
#name(name = nil) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/factory_scenarios/mail/preview.rb', line 18 def name(name=nil) if name @name = name else @name end end |
#render ⇒ Object
6 7 8 |
# File 'lib/factory_scenarios/mail/preview.rb', line 6 def render end |