Class: LetterMX::Subscriber
- Inherits:
-
Object
- Object
- LetterMX::Subscriber
- Defined in:
- lib/letter_mx/subscriber.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#http_body ⇒ Object
readonly
Returns the value of attribute http_body.
-
#http_response ⇒ Object
readonly
Returns the value of attribute http_response.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
Instance Method Summary collapse
-
#initialize(response) ⇒ Subscriber
constructor
A new instance of Subscriber.
Constructor Details
#initialize(response) ⇒ Subscriber
Returns a new instance of Subscriber.
10 11 12 13 14 15 16 17 18 |
# File 'lib/letter_mx/subscriber.rb', line 10 def initialize(response) @http_response = response if @http_response @http_status = @http_response.headers["status"] if @http_response.headers @http_body = @http_response.body @data = @http_response.parsed_response end end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
8 9 10 |
# File 'lib/letter_mx/subscriber.rb', line 8 def data @data end |
#http_body ⇒ Object (readonly)
Returns the value of attribute http_body.
7 8 9 |
# File 'lib/letter_mx/subscriber.rb', line 7 def http_body @http_body end |
#http_response ⇒ Object (readonly)
Returns the value of attribute http_response.
5 6 7 |
# File 'lib/letter_mx/subscriber.rb', line 5 def http_response @http_response end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
6 7 8 |
# File 'lib/letter_mx/subscriber.rb', line 6 def http_status @http_status end |