Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
lib/asir/request.rb | 30 | 20 | 66.67%
|
50.00%
|
Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.
1 |
2 module ASIR |
3 # !SLIDE |
4 # Request |
5 # |
6 # Encapsulate the request message from the Client to be handled by the Service. |
7 class Request |
8 include AdditionalData, RequestIdentity, CodeMore |
9 attr_accessor :receiver, :receiver_class, :selector, :arguments, :block |
10 attr_accessor :response |
11 |
12 def initialize r, s, a, b |
13 @receiver, @selector, @arguments = r, s, a |
14 @block = b if b |
15 @receiver_class = @receiver.class |
16 end |
17 |
18 def invoke! |
19 @response = Response.new(self, @result = @receiver.__send__(@selector, *@arguments)) |
20 rescue *Error::Unforwardable.unforwardable => exc |
21 @response = Response.new(self, nil, Error::Unforwardable.new(exc)) |
22 rescue ::Exception => exc |
23 @response = Response.new(self, nil, exc) |
24 end |
25 |
26 # Optional: Specifies the Numeric seconds or absolute Time to delay the Request until actual processing. |
27 attr_accessor :delay |
28 end |
29 # !SLIDE END |
30 end |
Generated on Fri Jan 27 17:37:46 -0600 2012 with rcov 0.9.8