Class: Redwood::Account
Instance Attribute Summary collapse
-
#gpgkey ⇒ Object
Returns the value of attribute gpgkey.
-
#sendmail ⇒ Object
Returns the value of attribute sendmail.
-
#signature ⇒ Object
Returns the value of attribute signature.
Attributes inherited from Person
Instance Method Summary collapse
-
#bounce_sendmail ⇒ Object
Default sendmail command for bouncing mail, deduced from #sendmail.
-
#initialize(h) ⇒ Account
constructor
A new instance of Account.
Methods inherited from Person
#eql?, from_address, from_address_list, from_name_and_email, #full_address, full_address, #hash, #indexable_content, #longname, #mediumname, #shortname, #sort_by_me, #to_s
Constructor Details
#initialize(h) ⇒ Account
Returns a new instance of Account.
6 7 8 9 10 11 12 13 |
# 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] @gpgkey = h[:gpgkey] end |
Instance Attribute Details
#gpgkey ⇒ Object
Returns the value of attribute gpgkey.
4 5 6 |
# File 'lib/sup/account.rb', line 4 def gpgkey @gpgkey end |
#sendmail ⇒ Object
Returns the value of attribute sendmail.
4 5 6 |
# File 'lib/sup/account.rb', line 4 def sendmail @sendmail end |
#signature ⇒ Object
Returns the value of attribute signature.
4 5 6 |
# File 'lib/sup/account.rb', line 4 def signature @signature end |
Instance Method Details
#bounce_sendmail ⇒ Object
Default sendmail command for bouncing mail, deduced from #sendmail
17 18 19 20 21 22 23 24 |
# File 'lib/sup/account.rb', line 17 def bounce_sendmail sendmail.sub(/\s(\-(ti|it|t))\b/) do |match| case $1 when '-t' then '' else ' -i' end end end |