Object
# File lib/rr/double_definitions/strategies/strategy.rb, line 31
31: def initialize(double_definition_create)
32: @double_definition_create = double_definition_create
33: end
# File lib/rr/double_definitions/strategies/strategy.rb, line 7
7: def register(strategy_method_name, *alias_method_names)
8: @strategy_method_name = strategy_method_name
9: register_self_at_double_definition_create(strategy_method_name)
10: DoubleDefinitionCreate.class_eval do
11: alias_method_names.each do |alias_method_name|
12: alias_method alias_method_name, strategy_method_name
13: end
14: end
15: RR::Adapters::RRMethods.register_strategy_class(self, strategy_method_name)
16: DoubleDefinition.register_strategy_class(self, strategy_method_name)
17: RR::Adapters::RRMethods.class_eval do
18: alias_method_names.each do |alias_method_name|
19: alias_method alias_method_name, strategy_method_name
20: end
21: end
22: end
# File lib/rr/double_definitions/strategies/strategy.rb, line 35
35: def call(definition, method_name, args, handler)
36: @definition, @method_name, @args, @handler = definition, method_name, args, handler
37: do_call
38: end
# File lib/rr/double_definitions/strategies/strategy.rb, line 48
48: def do_call
49: raise NotImplementedError
50: end
# File lib/rr/double_definitions/strategies/strategy.rb, line 52
52: def permissive_argument
53: if args.empty?
54: definition.with_any_args
55: else
56: definition.with(*args)
57: end
58: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.