Class: WhoCan::Responder::Response
- Inherits:
-
Object
- Object
- WhoCan::Responder::Response
- Defined in:
- lib/who_can/responder.rb
Instance Attribute Summary collapse
-
#delay ⇒ Object
Returns the value of attribute delay.
-
#do_not_respond ⇒ Object
Returns the value of attribute do_not_respond.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(header, payload) ⇒ Response
constructor
A new instance of Response.
- #validate! ⇒ Object
Constructor Details
#initialize(header, payload) ⇒ Response
Returns a new instance of Response.
13 14 15 16 17 |
# File 'lib/who_can/responder.rb', line 13 def initialize(header, payload) @header, @payload = header, payload @response = '' @do_not_respond = false end |
Instance Attribute Details
#delay ⇒ Object
Returns the value of attribute delay.
9 10 11 |
# File 'lib/who_can/responder.rb', line 9 def delay @delay end |
#do_not_respond ⇒ Object
Returns the value of attribute do_not_respond.
11 12 13 |
# File 'lib/who_can/responder.rb', line 11 def do_not_respond @do_not_respond end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
9 10 11 |
# File 'lib/who_can/responder.rb', line 9 def header @header end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
9 10 11 |
# File 'lib/who_can/responder.rb', line 9 def payload @payload end |
#response ⇒ Object
Returns the value of attribute response.
9 10 11 |
# File 'lib/who_can/responder.rb', line 9 def response @response end |
Instance Method Details
#validate! ⇒ Object
31 32 33 |
# File 'lib/who_can/responder.rb', line 31 def validate! raise DelayMustBeSetError unless delay end |