lib/roda/plugins/mailer.rb
def mail(path, *args)
          mail = ::Mail.new
          catch(:no_mail) do
            unless mail.equal?(new("PATH_INFO"=>path, 'SCRIPT_NAME'=>'', "REQUEST_METHOD"=>"MAIL", 'rack.input'=>StringIO.new, 'roda.mail'=>mail, 'roda.mail_args'=>args)._roda_handle_main_route)
              raise Error, "route did not return mail instance for #{path.inspect}, #{args.inspect}"
            end
            mail
          end
        end
# Return a Mail::Message instance for the email for the given request path
# and arguments.   Any arguments given are yielded to the appropriate +r.mail+
# block after any usual match block arguments. You can further manipulate the
#returned mail object before calling +deliver+ to send the mail.
Return a Mail::Message instance for the email for the given request path
and arguments.   Any arguments given are yielded to the appropriate +r.mail+
block after any usual match block arguments. You can further manipulate the
returned mail object before calling +deliver+ to send the mail.
Return a Mail :: Message instance for the email for the given request path and arguments . Any arguments given are yielded to the appropriate + r . mail + block after any usual match block arguments . You can further manipulate the returned mail object before calling + deliver + to send the mail .
def mail(path, *args)
          mail = ::Mail.new
          catch(:no_mail) do
            unless mail.equal?(new("PATH_INFO"=>path, 'SCRIPT_NAME'=>'', "REQUEST_METHOD"=>"MAIL", 'rack.input'=>StringIO.new, 'roda.mail'=>mail, 'roda.mail_args'=>args)._roda_handle_main_route)
              raise Error, "route did not return mail instance for #{path.inspect}, #{args.inspect}"
            end
            mail
          end
        end
def mail ( path , * args ) mail = :: Mail . new catch ( :no_mail ) do unless mail . equal? ( new ( "PATH_INFO" => path , 'SCRIPT_NAME' => '' , "REQUEST_METHOD" => "MAIL" , 'rack.input' => StringIO . new , 'roda.mail' => mail , 'roda.mail_args' => args ) . _roda_handle_main_route ) raise Error , "route did not return mail instance for #{path.inspect}, #{args.inspect}" end mail end end
Return a Mail::Message instance for the email for the given request path
and arguments.
Return a Mail :: Message instance for the email for the given request path and arguments .
path
args