Parent

Files

Class

Public Instance Methods

clr_type?() click to toggle source

indicates whether this type has a CLR type in its ancestors

    # File lib/caricature/core_ext/class.rb, line 9
 9:   def clr_type?
10:     !self.to_clr_type.nil? ||
11:             self.included_modules.any? {|mod| !mod.to_clr_type.nil? } ||
12:             self.ancestors.reject {|mod| mod == Object }.any? { |mod| !mod.to_clr_type.nil? }
13:   end
demodulize() click to toggle source

removes all the modules from this class name

   # File lib/caricature/core_ext/class.rb, line 4
4:   def demodulize
5:     self.to_s.gsub(/^.*::/, '')
6:   end
isolate(name=nil, recorder = Caricature::MethodCallRecorder.new, expectations = Caricature::Expectations.new, &block) click to toggle source
    # File lib/caricature/core_ext/class.rb, line 15
15:   def isolate(name=nil, recorder = Caricature::MethodCallRecorder.new, expectations = Caricature::Expectations.new, &block)
16:     iso = Caricature::Isolation.for(self, recorder, expectations)
17:     return iso unless name
18:     if block
19:       if block.arity > 0
20:         @expectation = iso.when_class_receives(name, &block)
21:       else
22:         @expectation = iso.when_class_receives(name)
23:         instance_eval &block
24:       end
25:     end
26:     iso
27:   end
Also aliased as: when_receiving, mock, stub
mock(name=nil, recorder = Caricature::MethodCallRecorder.new, expectations = Caricature::Expectations.new, &block) click to toggle source
Alias for: isolate
stub(name=nil, recorder = Caricature::MethodCallRecorder.new, expectations = Caricature::Expectations.new, &block) click to toggle source
Alias for: isolate
when_receiving(name=nil, recorder = Caricature::MethodCallRecorder.new, expectations = Caricature::Expectations.new, &block) click to toggle source
Alias for: isolate

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.