Class: E4commerce::E4CProduct
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- E4commerce::E4CProduct
- Defined in:
- lib/e4commerce/product.rb
Overview
class E4CProduct < ActiveRecord::Base -> Rails project, need database
Instance Attribute Summary collapse
-
#brand ⇒ Object
Returns the value of attribute brand.
-
#serial_number ⇒ Object
Returns the value of attribute serial_number.
-
#title ⇒ Object
Returns the value of attribute title.
-
#unit_price ⇒ Object
Returns the value of attribute unit_price.
Instance Method Summary collapse
-
#initialize(title, serial_number, brand, unit_price) ⇒ E4CProduct
constructor
A new instance of E4CProduct.
- #sale ⇒ Object
- #search ⇒ Object
Constructor Details
#initialize(title, serial_number, brand, unit_price) ⇒ E4CProduct
Returns a new instance of E4CProduct.
15 16 17 18 19 20 |
# File 'lib/e4commerce/product.rb', line 15 def initialize(title, serial_number, brand, unit_price) @title = title @serial_number = serial_number @brand = brand @unit_price = unit_price end |
Instance Attribute Details
#brand ⇒ Object
Returns the value of attribute brand.
12 13 14 |
# File 'lib/e4commerce/product.rb', line 12 def brand @brand end |
#serial_number ⇒ Object
Returns the value of attribute serial_number.
11 12 13 |
# File 'lib/e4commerce/product.rb', line 11 def serial_number @serial_number end |
#title ⇒ Object
Returns the value of attribute title.
10 11 12 |
# File 'lib/e4commerce/product.rb', line 10 def title @title end |
#unit_price ⇒ Object
Returns the value of attribute unit_price.
13 14 15 |
# File 'lib/e4commerce/product.rb', line 13 def unit_price @unit_price end |
Instance Method Details
#sale ⇒ Object
26 27 28 |
# File 'lib/e4commerce/product.rb', line 26 def sale raise 'Abstract method' end |
#search ⇒ Object
22 23 24 |
# File 'lib/e4commerce/product.rb', line 22 def search raise 'Abstract method' end |