Parent

Files

Object

Public Instance Methods

define_cmethod(name, &blk) click to toggle source

defines a class method on an object

    # File lib/core_ext/object.rb, line 15
15:   def define_cmethod(name, &blk)
16:     (class << self; self; end).instance_eval { define_method name, &blk }
17:   end
http_context_isolation(url="") click to toggle source

(Not documented)

    # File lib/caricature/clr/aspnet_mvc.rb, line 30
30: def http_context_isolation(url="")
31: 
32:   context = Caricature::Isolation.for(HttpContextBase)
33:   request = Caricature::Isolation.for(HttpRequestBase)
34:   response = Caricature::Isolation.for(HttpResponseBase)
35:   session = Caricature::Isolation.for(HttpSessionStateBase)
36:   server = Caricature::Isolation.for(HttpServerUtilityBase)
37: 
38:   context.when_receiving(:request).return(request)
39:   context.when_receiving(:response).return(response)
40:   context.when_receiving(:session).return(session)
41:   context.when_receiving(:server).return(server)
42: 
43:   setup_request_url(context.request, url) unless url.nil? or url.empty?
44: 
45:   context
46: end
is_clr_type?() click to toggle source

returns whether this object is a clr_type. if it has a CLR type in one of its ancestors

   # File lib/core_ext/object.rb, line 5
5:   def is_clr_type?
6:     self.class.is_clr_type?
7:   end
setup_request_url(request, url) click to toggle source

(Not documented)

    # File lib/caricature/clr/aspnet_mvc.rb, line 48
48: def setup_request_url(request, url)
49:   raise ArgumentError.new("url should not be nil") if url.nil? or url.empty?
50:   raise ArgumentError.new("we expect a url to start with '~/'.") unless url =~ /^~\//
51: 
52:   request.when_receiving(:query_string).return(url.to_s.to_qs_parameters)
53:   request.when_receiving(:app_relative_current_execution_file_path).return(url.to_s.to_url_filename)
54:   request.when_receiving(:path_info).return("")
55: end
to_clr_type() click to toggle source

returns the clr type of this object if any

    # File lib/core_ext/object.rb, line 10
10:   def to_clr_type
11:     self.class.to_clr_type
12:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.