Exception: Groat::SMTPD::Response
- Inherits:
-
Exception
- Object
- Exception
- Groat::SMTPD::Response
- Defined in:
- lib/groat/smtpd/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Response
constructor
A new instance of Response.
- #reply_text ⇒ Object
- #terminate? ⇒ Boolean
Constructor Details
#initialize(args = {}) ⇒ Response
Returns a new instance of Response.
28 29 30 31 |
# File 'lib/groat/smtpd/base.rb', line 28 def initialize(args = {}) @message = args[:message] || "Unknown" @terminate = args[:terminate] || false end |
Instance Method Details
#reply_text ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/groat/smtpd/base.rb', line 37 def reply_text if @message.is_a? Array @message.join("\r\n") + "\r\n" else @message.to_s + "\r\n" end end |
#terminate? ⇒ Boolean
33 34 35 |
# File 'lib/groat/smtpd/base.rb', line 33 def terminate? @terminate end |