Code Search for Developers
 
 
  

cart_item.rb from crlove at Krugle


Show cart_item.rb syntax highlighted

class CartItem
  include Reloadable
  
  attr_reader :product, :quantity
  
  def initialize(product)
    @product = product
    @quantity = 1
  end
  
  def increment_quantity
    @quantity += 1
  end
  
  def title
    @product.title
  end
  
  def price
    @product.price * @quantity
  end
end




See more files for this project here

crlove

Online psychological-test-based friend-making system.

Project homepage: http://sourceforge.net/projects/crlove
Programming language(s): Java,JavaScript,Ruby,XML
License: other

  cart.rb
  cart_item.rb
  line_item.rb
  order.rb
  product.rb
  user.rb