Class: ActiveHook::Server::Send
- Inherits:
-
Object
- Object
- ActiveHook::Server::Send
- Defined in:
- lib/activehook/server/send.rb
Instance Attribute Summary collapse
-
#hook ⇒ Object
Returns the value of attribute hook.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#response_time ⇒ Object
readonly
Returns the value of attribute response_time.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Send
constructor
A new instance of Send.
- #start ⇒ Object
- #success? ⇒ Boolean
- #uri ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Send
Returns a new instance of Send.
13 14 15 |
# File 'lib/activehook/server/send.rb', line 13 def initialize( = {}) .each { |key, value| send("#{key}=", value) } end |
Instance Attribute Details
#hook ⇒ Object
Returns the value of attribute hook.
10 11 12 |
# File 'lib/activehook/server/send.rb', line 10 def hook @hook end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
11 12 13 |
# File 'lib/activehook/server/send.rb', line 11 def response @response end |
#response_time ⇒ Object (readonly)
Returns the value of attribute response_time.
11 12 13 |
# File 'lib/activehook/server/send.rb', line 11 def response_time @response_time end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
11 12 13 |
# File 'lib/activehook/server/send.rb', line 11 def status @status end |
Instance Method Details
#start ⇒ Object
17 18 19 20 |
# File 'lib/activehook/server/send.rb', line 17 def start @status = post_hook log_status end |
#success? ⇒ Boolean
26 27 28 |
# File 'lib/activehook/server/send.rb', line 26 def success? @status == :success end |
#uri ⇒ Object
22 23 24 |
# File 'lib/activehook/server/send.rb', line 22 def uri @uri ||= URI.parse(@hook.uri) end |