227 lines
6.1 KiB
HTML
227 lines
6.1 KiB
HTML
<!DOCTYPE html>
|
|
<!--
|
|
! Excerpted from "Agile Web Development with Rails",
|
|
! published by The Pragmatic Bookshelf.
|
|
! Copyrights apply to this code. It may not be used to create training material,
|
|
! courses, books, articles, and the like. Contact us if you are in doubt.
|
|
! We make no guarantees that this code is fit for any purpose.
|
|
! Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
|
|
-->
|
|
|
|
<html>
|
|
<head>
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
|
|
|
<title>class LineItem - Rails Application Documentation</title>
|
|
|
|
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
|
|
|
<script type="text/javascript">
|
|
var rdoc_rel_prefix = "./";
|
|
</script>
|
|
|
|
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
|
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
|
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
|
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
|
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
|
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
|
|
|
|
|
<body id="top" class="class">
|
|
<nav id="metadata">
|
|
<nav id="home-section" class="section">
|
|
<h3 class="section-header">
|
|
<a href="./index.html">Home</a>
|
|
<a href="./table_of_contents.html#classes">Classes</a>
|
|
<a href="./table_of_contents.html#methods">Methods</a>
|
|
</h3>
|
|
</nav>
|
|
|
|
|
|
<nav id="search-section" class="section project-section" class="initially-hidden">
|
|
<form action="#" method="get" accept-charset="utf-8">
|
|
<h3 class="section-header">
|
|
<input type="text" name="search" placeholder="Search" id="search-field"
|
|
title="Type to search, Up and Down to navigate, Enter to load">
|
|
</h3>
|
|
</form>
|
|
|
|
<ul id="search-results" class="initially-hidden"></ul>
|
|
</nav>
|
|
|
|
|
|
<div id="file-metadata">
|
|
<nav id="file-list-section" class="section">
|
|
<h3 class="section-header">Defined In</h3>
|
|
<ul>
|
|
<li>app/models/line_item.rb
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
</div>
|
|
|
|
<div id="class-metadata">
|
|
|
|
<nav id="parent-class-section" class="section">
|
|
<h3 class="section-header">Parent</h3>
|
|
|
|
<p class="link">ActiveRecord::Base
|
|
|
|
</nav>
|
|
|
|
|
|
<!-- Method Quickref -->
|
|
<nav id="method-list-section" class="section">
|
|
<h3 class="section-header">Methods</h3>
|
|
|
|
<ul class="link-list">
|
|
|
|
<li><a href="#method-i-total_price">#total_price</a>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
<div id="project-metadata">
|
|
<nav id="fileindex-section" class="section project-section">
|
|
<h3 class="section-header">Pages</h3>
|
|
|
|
<ul>
|
|
|
|
<li class="file"><a href="./README_rdoc.html">README</a>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
<nav id="classindex-section" class="section project-section">
|
|
<h3 class="section-header">Class and Module Index</h3>
|
|
|
|
<ul class="link-list">
|
|
|
|
<li><a href="./AdminController.html">AdminController</a>
|
|
|
|
<li><a href="./AdminHelper.html">AdminHelper</a>
|
|
|
|
<li><a href="./ApplicationController.html">ApplicationController</a>
|
|
|
|
<li><a href="./ApplicationHelper.html">ApplicationHelper</a>
|
|
|
|
<li><a href="./Cart.html">Cart</a>
|
|
|
|
<li><a href="./CartsController.html">CartsController</a>
|
|
|
|
<li><a href="./CartsHelper.html">CartsHelper</a>
|
|
|
|
<li><a href="./CurrentCart.html">CurrentCart</a>
|
|
|
|
<li><a href="./LineItem.html">LineItem</a>
|
|
|
|
<li><a href="./LineItemsController.html">LineItemsController</a>
|
|
|
|
<li><a href="./LineItemsHelper.html">LineItemsHelper</a>
|
|
|
|
<li><a href="./Order.html">Order</a>
|
|
|
|
<li><a href="./OrderNotifier.html">OrderNotifier</a>
|
|
|
|
<li><a href="./OrdersController.html">OrdersController</a>
|
|
|
|
<li><a href="./OrdersHelper.html">OrdersHelper</a>
|
|
|
|
<li><a href="./Product.html">Product</a>
|
|
|
|
<li><a href="./ProductsController.html">ProductsController</a>
|
|
|
|
<li><a href="./ProductsHelper.html">ProductsHelper</a>
|
|
|
|
<li><a href="./SessionsController.html">SessionsController</a>
|
|
|
|
<li><a href="./SessionsHelper.html">SessionsHelper</a>
|
|
|
|
<li><a href="./StoreController.html">StoreController</a>
|
|
|
|
<li><a href="./StoreHelper.html">StoreHelper</a>
|
|
|
|
<li><a href="./User.html">User</a>
|
|
|
|
<li><a href="./UsersController.html">UsersController</a>
|
|
|
|
<li><a href="./UsersHelper.html">UsersHelper</a>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</div>
|
|
</nav>
|
|
|
|
<div id="documentation">
|
|
<h1 class="class">class LineItem</h1>
|
|
|
|
<div id="description" class="description">
|
|
|
|
</div><!-- description -->
|
|
|
|
|
|
|
|
|
|
<section id="5Buntitled-5D" class="documentation-section">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Methods -->
|
|
|
|
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
|
<h3 class="section-header">Public Instance Methods</h3>
|
|
|
|
|
|
<div id="method-i-total_price" class="method-detail ">
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">total_price</span><span
|
|
class="method-args">()</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
</div>
|
|
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code" id="total_price-source">
|
|
<pre><span class="ruby-comment"># File app/models/line_item.rb, line 8</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">total_price</span>
|
|
<span class="ruby-identifier">product</span>.<span class="ruby-identifier">price</span> * <span class="ruby-identifier">quantity</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- total_price-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- total_price-method -->
|
|
|
|
|
|
</section><!-- public-instance-method-details -->
|
|
|
|
</section><!-- 5Buntitled-5D -->
|
|
|
|
</div><!-- documentation -->
|
|
|
|
|
|
<footer id="validator-badges">
|
|
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
|
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
|
|
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
|
</footer>
|
|
|