Class: EmailDirect::Response
- Inherits:
-
Object
- Object
- EmailDirect::Response
- Defined in:
- lib/email_direct/response.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
-
#initialize(xml) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
Constructor Details
#initialize(xml) ⇒ Response
Returns a new instance of Response.
5 6 7 8 |
# File 'lib/email_direct/response.rb', line 5 def initialize(xml) @xml = xml parse_response! end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/email_direct/response.rb', line 3 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/email_direct/response.rb', line 3 def data @data end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/email_direct/response.rb', line 3 def @message end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
3 4 5 |
# File 'lib/email_direct/response.rb', line 3 def xml @xml end |
Instance Method Details
#success? ⇒ Boolean
10 11 12 |
# File 'lib/email_direct/response.rb', line 10 def success? @code == 0 end |