lib/rmobio/doc/classes/Rmobio/ConfigManager.src/M000001.html in rmobio-1.1.14 vs lib/rmobio/doc/classes/Rmobio/ConfigManager.src/M000001.html in rmobio-1.1.15

- old
+ new

@@ -8,20 +8,23 @@ <title>get_external_context (Rmobio::ConfigManager)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> - <pre><span class="ruby-comment cmt"># File config_manager.rb, line 101</span> + <pre><span class="ruby-comment cmt"># File config_manager.rb, line 108</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_external_context</span>(<span class="ruby-identifier">url</span>=<span class="ruby-keyword kw">nil</span>) - <span class="ruby-identifier">external_context_prop</span> = <span class="ruby-value str">&quot;_external_context&quot;</span> <span class="ruby-identifier">context</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">'HTTP_MOBIO_CONTEXT'</span>] - <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">context</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">context</span> <span class="ruby-operator">==</span> <span class="ruby-value str">''</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">url</span> - <span class="ruby-identifier">external_context</span> = <span class="ruby-constant">MOBIO_CONFIG</span>[<span class="ruby-identifier">url</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-identifier">external_context_prop</span>, <span class="ruby-identifier">context</span>) - <span class="ruby-constant">RAILS_DEFAULT_LOGGER</span>.<span class="ruby-identifier">debug</span> <span class="ruby-value str">'Utils: Setting the uri to: &quot;'</span> <span class="ruby-operator">+</span> - <span class="ruby-identifier">external_context</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'&quot; for the current request.'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-constant">RAILS_DEFAULT_LOGGER</span> - <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">external_context</span> - <span class="ruby-keyword kw">end</span> + <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">url</span> + <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">context</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">context</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">''</span> + <span class="ruby-identifier">external_context</span> = <span class="ruby-constant">MOBIO_CONFIG</span>[<span class="ruby-identifier">url</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-constant">EXTERNAL_CONTEXT_PROP</span>, <span class="ruby-identifier">context</span>) + <span class="ruby-constant">RAILS_DEFAULT_LOGGER</span>.<span class="ruby-identifier">debug</span> <span class="ruby-value str">'ConfigManager: Setting the uri to: &quot;'</span> <span class="ruby-operator">+</span> + <span class="ruby-identifier">external_context</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'&quot; for the current request.'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-constant">RAILS_DEFAULT_LOGGER</span> + <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">external_context</span> + <span class="ruby-keyword kw">else</span> + <span class="ruby-keyword kw">return</span> <span class="ruby-constant">MOBIO_CONFIG</span>[<span class="ruby-identifier">url</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-constant">EXTERNAL_CONTEXT_PROP</span>, <span class="ruby-value str">''</span>) + <span class="ruby-keyword kw">end</span> + <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file