HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Ruby27-x64/share/doc/ruby/html/NoMethodError.html
<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">

<title>class NoMethodError - RDoc Documentation</title>

<script type="text/javascript">
  var rdoc_rel_prefix = "./";
  var index_rel_prefix = "./";
</script>

<script src="./js/navigation.js" defer></script>
<script src="./js/search.js" defer></script>
<script src="./js/search_index.js" defer></script>
<script src="./js/searcher.js" defer></script>
<script src="./js/darkfish.js" defer></script>

<link href="./css/fonts.css" rel="stylesheet">
<link href="./css/rdoc.css" rel="stylesheet">




<body id="top" role="document" class="class">
<nav role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2>
    <a href="./index.html" rel="home">Home</a>
  </h2>

  <div id="table-of-contents-navigation">
    <a href="./table_of_contents.html#pages">Pages</a>
    <a href="./table_of_contents.html#classes">Classes</a>
    <a href="./table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  

  <div id="class-metadata">
    
    <div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  
  <p class="link"><a href="NameError.html">NameError</a>
  
</div>

    
    
    <!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    
    <li ><a href="#method-c-new">::new</a>
    
    <li ><a href="#method-i-args">#args</a>
    
    <li ><a href="#method-i-private_call-3F">#private_call?</a>
    
  </ul>
</div>

  </div>
</nav>

<main role="main" aria-labelledby="class-NoMethodError">
  <h1 id="class-NoMethodError" class="class">
    class NoMethodError
  </h1>

  <section class="description">
    
<p>Raised when a method is called on a receiver which doesn&#39;t have it defined and also fails to respond with <code>method_missing</code>.</p>

<pre class="ruby"><span class="ruby-string">&quot;hello&quot;</span>.<span class="ruby-identifier">to_ary</span>
</pre>

<p><em>raises the exception:</em></p>

<pre>NoMethodError: undefined method `to_ary&#39; for &quot;hello&quot;:String</pre>

  </section>

  
  <section id="5Buntitled-5D" class="documentation-section">
    

    

    

    

    
     <section id="public-class-5Buntitled-5D-method-details" class="method-section">
       <header>
         <h3>Public Class Methods</h3>
       </header>

    
      <div id="method-c-new" class="method-detail ">
        
        
        <div class="method-heading">
          <span class="method-callseq">
            new(msg=nil, name=nil, args=nil, private=false, receiver: nil)  &rarr; no_method_error
          </span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        
        

        <div class="method-description">
          
          <p>Construct a <a href="NoMethodError.html"><code>NoMethodError</code></a> exception for a method of the given name called with the given arguments. The name may be accessed using the <code>#name</code> method on the resulting object, and the arguments using the <code>#args</code> method.</p>

<p>If <em>private</em> argument were passed, it designates method was attempted to call in private context, and can be accessed with <code>#private_call?</code> method.</p>

<p><em>receiver</em> argument stores an object whose method was called.</p>
          
          

          
          <div class="method-source-code" id="new-source">
            <pre>static VALUE
nometh_err_initialize(int argc, VALUE *argv, VALUE self)
{
    int priv;
    VALUE args, options;
    argc = rb_scan_args(argc, argv, &quot;*:&quot;, NULL, &amp;options);
    priv = (argc &gt; 3) &amp;&amp; (--argc, RTEST(argv[argc]));
    args = (argc &gt; 2) ? argv[--argc] : Qnil;
    if (!NIL_P(options)) argv[argc++] = options;
    rb_call_super_kw(argc, argv, RB_PASS_CALLED_KEYWORDS);
    return nometh_err_init_attr(self, args, priv);
}</pre>
          </div>
          
        </div>

        

        
      </div>

    
    </section>
  
     <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
       <header>
         <h3>Public Instance Methods</h3>
       </header>

    
      <div id="method-i-args" class="method-detail ">
        
        
        <div class="method-heading">
          <span class="method-callseq">
            args  &rarr; obj
          </span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        
        

        <div class="method-description">
          
          <p>Return the arguments passed in as the third parameter to the constructor.</p>
          
          

          
          <div class="method-source-code" id="args-source">
            <pre>static VALUE
nometh_err_args(VALUE self)
{
    return rb_attr_get(self, id_args);
}</pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-private_call-3F" class="method-detail ">
        
        
        <div class="method-heading">
          <span class="method-callseq">
            private_call?  &rarr; true or false
          </span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        
        

        <div class="method-description">
          
          <p>Return true if the caused method was called as private.</p>
          
          

          
          <div class="method-source-code" id="private_call-3F-source">
            <pre>static VALUE
nometh_err_private_call_p(VALUE self)
{
    return rb_attr_get(self, id_private_call_p);
}</pre>
          </div>
          
        </div>

        

        
      </div>

    
    </section>
  
  </section>

</main>


<footer id="validator-badges" role="contentinfo">
  <p><a href="https://validator.w3.org/check/referer">Validate</a>
  <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.1.
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>