Module: PrintStuffMail
- Defined in:
- lib/psm.rb,
lib/psm/session.rb
Defined Under Namespace
Classes: Confirmation, Session
Constant Summary collapse
- BASE_URL =
's.copypastel.com'
Class Attribute Summary collapse
-
.account_id ⇒ Object
Returns the value of attribute account_id.
Class Method Summary collapse
Instance Method Summary collapse
Class Attribute Details
.account_id ⇒ Object
Returns the value of attribute account_id.
19 20 21 |
# File 'lib/psm.rb', line 19 def account_id @account_id end |
Class Method Details
.mail!(message, address, return_address = nil) {|c = Confirmation.new| ... } ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/psm.rb', line 21 def mail!( , address, return_address = nil ) raise(SecurityError, 'no account_id set.') unless account_id raise(SecurityError, 'need to confirm!') unless block_given? yield c = Confirmation.new raise(SecurityError, 'need to confirm!') unless c.confirmed? @session ||= Session.new account_id raise unless @session.active? or @session.renew! # needs an error type post_letter(, address, return_address) end |
Instance Method Details
#mail!(message, return_address = nil, &block) ⇒ Object
54 55 56 |
# File 'lib/psm.rb', line 54 def mail!( , return_address = nil, &block ) PSM.mail!( , self.address, return_address, block) end |