Class: Bcash::Item
- Inherits:
-
Object
- Object
- Bcash::Item
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/bcash/item.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#integration ⇒ Object
Returns the value of attribute integration.
-
#price ⇒ Object
Returns the value of attribute price.
-
#shipping_cost ⇒ Object
Returns the value of attribute shipping_cost.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(attributes = {}) ⇒ Item
Returns a new instance of Item.
10 11 12 13 14 15 |
# File 'lib/bcash/item.rb', line 10 def initialize(attributes={}) @id = attributes[:id] @description = attributes[:description] @amount = attributes[:amount] @price = attributes[:price] end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
5 6 7 |
# File 'lib/bcash/item.rb', line 5 def amount @amount end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/bcash/item.rb', line 5 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/bcash/item.rb', line 5 def id @id end |
#integration ⇒ Object
Returns the value of attribute integration.
5 6 7 |
# File 'lib/bcash/item.rb', line 5 def integration @integration end |
#price ⇒ Object
Returns the value of attribute price.
5 6 7 |
# File 'lib/bcash/item.rb', line 5 def price @price end |
#shipping_cost ⇒ Object
Returns the value of attribute shipping_cost.
5 6 7 |
# File 'lib/bcash/item.rb', line 5 def shipping_cost @shipping_cost end |