class Redwood::Account

Attributes

sendmail[RW]
signature[RW]

Public Class Methods

new(h) click to toggle source
Calls superclass method
# File lib/sup/account.rb, line 6
def initialize h
  raise ArgumentError, "no name for account" unless h[:name]
  raise ArgumentError, "no email for account" unless h[:email]
  super h[:name], h[:email]
  @sendmail = h[:sendmail]
  @signature = h[:signature]
end

Public Instance Methods

bounce_sendmail() click to toggle source

Default sendmail command for bouncing mail, deduced from sendmail

# File lib/sup/account.rb, line 16
def bounce_sendmail
  sendmail.sub(/\s(\-(ti|it|t))\b/) do |match|
    case $1
    when '-t' then ''
    else ' -i'
    end
  end
end