Class: Hermeneutics::Cli::LMTP::Response
- Inherits:
-
Object
- Object
- Hermeneutics::Cli::LMTP::Response
- Defined in:
- lib/hermeneutics/cli/lmtp.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
Instance Method Summary collapse
- #error? ⇒ Boolean
- #fatal? ⇒ Boolean
-
#initialize(code, msg) ⇒ Response
constructor
A new instance of Response.
- #kat ⇒ Object
- #ok? ⇒ Boolean
- #prelim? ⇒ Boolean
- #to_s ⇒ Object
- #waiting? ⇒ Boolean
Constructor Details
#initialize(code, msg) ⇒ Response
Returns a new instance of Response.
130 131 132 |
# File 'lib/hermeneutics/cli/lmtp.rb', line 130 def initialize code, msg @code, @msg = code, msg end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
128 129 130 |
# File 'lib/hermeneutics/cli/lmtp.rb', line 128 def code @code end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
128 129 130 |
# File 'lib/hermeneutics/cli/lmtp.rb', line 128 def msg @msg end |
Instance Method Details
#error? ⇒ Boolean
141 |
# File 'lib/hermeneutics/cli/lmtp.rb', line 141 def error? ; kat == 4 ; end |
#fatal? ⇒ Boolean
142 |
# File 'lib/hermeneutics/cli/lmtp.rb', line 142 def fatal? ; kat == 5 ; end |
#kat ⇒ Object
134 |
# File 'lib/hermeneutics/cli/lmtp.rb', line 134 def kat ; code / 100 ; end |
#ok? ⇒ Boolean
139 |
# File 'lib/hermeneutics/cli/lmtp.rb', line 139 def ok? ; kat == 2 ; end |
#prelim? ⇒ Boolean
138 |
# File 'lib/hermeneutics/cli/lmtp.rb', line 138 def prelim? ; kat == 1 ; end |
#to_s ⇒ Object
136 |
# File 'lib/hermeneutics/cli/lmtp.rb', line 136 def to_s ; "%03d %s" % [ @code, @msg] ; end |
#waiting? ⇒ Boolean
140 |
# File 'lib/hermeneutics/cli/lmtp.rb', line 140 def waiting? ; kat == 3 ; end |