LineItem.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <!DOCTYPE html>
  2. <!--
  3. ! Excerpted from "Agile Web Development with Rails",
  4. ! published by The Pragmatic Bookshelf.
  5. ! Copyrights apply to this code. It may not be used to create training material,
  6. ! courses, books, articles, and the like. Contact us if you are in doubt.
  7. ! We make no guarantees that this code is fit for any purpose.
  8. ! Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  9. -->
  10. <html>
  11. <head>
  12. <meta charset="utf-8">
  13. <title>class LineItem - Rails Application Documentation</title>
  14. <link href="./fonts.css" rel="stylesheet">
  15. <link href="./rdoc.css" rel="stylesheet">
  16. <script type="text/javascript">
  17. var rdoc_rel_prefix = "./";
  18. </script>
  19. <script src="./js/jquery.js"></script>
  20. <script src="./js/navigation.js"></script>
  21. <script src="./js/search_index.js"></script>
  22. <script src="./js/search.js"></script>
  23. <script src="./js/searcher.js"></script>
  24. <script src="./js/darkfish.js"></script>
  25. <body id="top" role="document" class="class">
  26. <nav role="navigation">
  27. <div id="project-navigation">
  28. <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  29. <h2>
  30. <a href="./index.html" rel="home">Home</a>
  31. </h2>
  32. <div id="table-of-contents-navigation">
  33. <a href="./table_of_contents.html#pages">Pages</a>
  34. <a href="./table_of_contents.html#classes">Classes</a>
  35. <a href="./table_of_contents.html#methods">Methods</a>
  36. </div>
  37. </div>
  38. <div id="search-section" role="search" class="project-section initially-hidden">
  39. <form action="#" method="get" accept-charset="utf-8">
  40. <div id="search-field-wrapper">
  41. <input id="search-field" role="combobox" aria-label="Search"
  42. aria-autocomplete="list" aria-controls="search-results"
  43. type="text" name="search" placeholder="Search" spellcheck="false"
  44. title="Type to search, Up and Down to navigate, Enter to load">
  45. </div>
  46. <ul id="search-results" aria-label="Search Results"
  47. aria-busy="false" aria-expanded="false"
  48. aria-atomic="false" class="initially-hidden"></ul>
  49. </form>
  50. </div>
  51. </div>
  52. <div id="class-metadata">
  53. <div id="parent-class-section" class="nav-section">
  54. <h3>Parent</h3>
  55. <p class="link">ActiveRecord::Base
  56. </div>
  57. <!-- Method Quickref -->
  58. <div id="method-list-section" class="nav-section">
  59. <h3>Methods</h3>
  60. <ul class="link-list" role="directory">
  61. <li ><a href="#method-i-total_price">#total_price</a>
  62. </ul>
  63. </div>
  64. </div>
  65. </nav>
  66. <main role="main" aria-labelledby="class-LineItem">
  67. <h1 id="class-LineItem" class="class">
  68. class LineItem
  69. </h1>
  70. <section class="description">
  71. </section>
  72. <section id="5Buntitled-5D" class="documentation-section">
  73. <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
  74. <header>
  75. <h3>Public Instance Methods</h3>
  76. </header>
  77. <div id="method-i-total_price" class="method-detail ">
  78. <div class="method-heading">
  79. <span class="method-name">total_price</span><span
  80. class="method-args">()</span>
  81. <span class="method-click-advice">click to toggle source</span>
  82. </div>
  83. <div class="method-description">
  84. <div class="method-source-code" id="total_price-source">
  85. <pre><span class="ruby-comment"># File app/models/line_item.rb, line 8</span>
  86. <span class="ruby-keyword">def</span> <span class="ruby-identifier">total_price</span>
  87. <span class="ruby-identifier">product</span>.<span class="ruby-identifier">price</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">quantity</span>
  88. <span class="ruby-keyword">end</span></pre>
  89. </div>
  90. </div>
  91. </div>
  92. </section>
  93. </section>
  94. </main>
  95. <footer id="validator-badges" role="contentinfo">
  96. <p><a href="http://validator.w3.org/check/referer">Validate</a>
  97. <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
  98. <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
  99. </footer>