Class: Jamef::Item
- Inherits:
-
Object
- Object
- Jamef::Item
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/jamef/item.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#length ⇒ Object
Returns the value of attribute length.
-
#price ⇒ Object
Returns the value of attribute price.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#weight ⇒ Object
Returns the value of attribute weight.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
- #cubage ⇒ Object
-
#initialize(width = nil, height = nil, length = nil, quantity = nil, weight = nil, price = nil) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(width = nil, height = nil, length = nil, quantity = nil, weight = nil, price = nil) ⇒ Item
Returns a new instance of Item.
9 10 11 12 13 14 15 16 |
# File 'lib/jamef/item.rb', line 9 def initialize(width=nil, height=nil, length=nil, quantity=nil, weight=nil, price=nil) @width = width @height = height @length = length @quantity = quantity @weight = weight @price = price end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
7 8 9 |
# File 'lib/jamef/item.rb', line 7 def height @height end |
#length ⇒ Object
Returns the value of attribute length.
7 8 9 |
# File 'lib/jamef/item.rb', line 7 def length @length end |
#price ⇒ Object
Returns the value of attribute price.
7 8 9 |
# File 'lib/jamef/item.rb', line 7 def price @price end |
#quantity ⇒ Object
Returns the value of attribute quantity.
7 8 9 |
# File 'lib/jamef/item.rb', line 7 def quantity @quantity end |
#weight ⇒ Object
Returns the value of attribute weight.
7 8 9 |
# File 'lib/jamef/item.rb', line 7 def weight @weight end |
#width ⇒ Object
Returns the value of attribute width.
7 8 9 |
# File 'lib/jamef/item.rb', line 7 def width @width end |