class LaptopHunt::Laptop
Attributes
price[RW]
ratings[RW]
shipping[RW]
title[RW]
Public Class Methods
all()
click to toggle source
# File lib/LaptopHunt/Laptop.rb, line 17 def self.all @@all end
find(id)
click to toggle source
# File lib/LaptopHunt/Laptop.rb, line 21 def self.find(id) self.all[id-1] end
new(title, price, ratings)
click to toggle source
# File lib/LaptopHunt/Laptop.rb, line 8 def initialize(title, price, ratings) @title = title @price = price @ratings = ratings @shipping = shipping self end