Class Index [+]

Quicksearch

CounterAdapter

Attributes

counts[R]

Public Class Methods

new(adapter) click to toggle source
    # File lib/dm-core/spec/lib/counter_adapter.rb, line 24
24:   def initialize(adapter)
25:     @counts  = Hash.new { |hash, key| hash[key] = 0 }
26:     @adapter = adapter
27:     @count   = 0
28:   end

Public Instance Methods

instance_of?(klass) click to toggle source
    # File lib/dm-core/spec/lib/counter_adapter.rb, line 14
14:   def instance_of?(klass)
15:     super || @adapter.instance_of?(klass)
16:   end
kind_of?(klass) click to toggle source
    # File lib/dm-core/spec/lib/counter_adapter.rb, line 10
10:   def kind_of?(klass)
11:     super || @adapter.kind_of?(klass)
12:   end
respond_to?(method, include_private = false) click to toggle source
    # File lib/dm-core/spec/lib/counter_adapter.rb, line 18
18:   def respond_to?(method, include_private = false)
19:     super || @adapter.respond_to?(method, include_private)
20:   end

Private Instance Methods

increment_count_for(method) click to toggle source
    # File lib/dm-core/spec/lib/counter_adapter.rb, line 30
30:   def increment_count_for(method)
31:     @counts[method] += 1
32:   end
method_missing(method, *args, &block) click to toggle source
    # File lib/dm-core/spec/lib/counter_adapter.rb, line 34
34:   def method_missing(method, *args, &block)
35:     increment_count_for(method)
36:     @adapter.send(method, *args, &block)
37:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.