Class Index [+]

Quicksearch

RR::MethodDispatches::MethodMissingDispatch

Attributes

subject[R]
method_name[R]

Public Class Methods

new(subject, method_name, args, block) click to toggle source
    # File lib/rr/method_dispatches/method_missing_dispatch.rb, line 11
11:       def initialize(subject, method_name, args, block)
12:         @subject, @method_name, @args, @block = subject, method_name, args, block
13:       end
original_method_missing_alias_name() click to toggle source
   # File lib/rr/method_dispatches/method_missing_dispatch.rb, line 5
5:         def original_method_missing_alias_name
6:           "__rr__original_method_missing"
7:         end

Public Instance Methods

call() click to toggle source
    # File lib/rr/method_dispatches/method_missing_dispatch.rb, line 15
15:       def call
16:         if Injections::DoubleInjection.exists?(subject, method_name)
17:           space.record_call(subject, method_name, args, block)
18:           @double = find_double_to_attempt
19: 
20:           if double
21:             double.method_call(args)
22:             call_yields
23:             return_value = extract_subject_from_return_value(call_implementation)
24:             if after_call_proc
25:               extract_subject_from_return_value(after_call_proc.call(return_value))
26:             else
27:               return_value
28:             end
29:           else
30:             double_not_found_error
31:           end
32:         else
33:           call_original_method
34:         end
35:       end
call_original_method() click to toggle source
    # File lib/rr/method_dispatches/method_missing_dispatch.rb, line 37
37:       def call_original_method
38:         double_injection.bypass_bound_method do
39:           call_original_method_missing
40:         end
41:       end

Protected Instance Methods

call_implementation() click to toggle source
    # File lib/rr/method_dispatches/method_missing_dispatch.rb, line 44
44:       def call_implementation
45:         if implementation_is_original_method?
46:           call_original_method
47:         else
48:           nil
49:         end
50:       end
double_injection() click to toggle source
    # File lib/rr/method_dispatches/method_missing_dispatch.rb, line 52
52:       def double_injection
53:         Injections::DoubleInjection.create(subject, method_name)
54:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.