Class: Spree::ShippingRate
- Inherits:
-
Struct
- Object
- Struct
- Spree::ShippingRate
- Defined in:
- app/models/spree/shipping_rate.rb
Instance Attribute Summary collapse
-
#cost ⇒ Object
Returns the value of attribute cost.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#shipping_method ⇒ Object
Returns the value of attribute shipping_method.
Instance Method Summary collapse
- #display_price ⇒ Object
-
#initialize(attributes = {}) ⇒ ShippingRate
constructor
A new instance of ShippingRate.
Constructor Details
#initialize(attributes = {}) ⇒ ShippingRate
Returns a new instance of ShippingRate.
3 4 5 6 7 |
# File 'app/models/spree/shipping_rate.rb', line 3 def initialize(attributes = {}) attributes.each do |k, v| self.send("#{k}=", v) end end |
Instance Attribute Details
#cost ⇒ Object
Returns the value of attribute cost
2 3 4 |
# File 'app/models/spree/shipping_rate.rb', line 2 def cost @cost end |
#currency ⇒ Object
Returns the value of attribute currency
2 3 4 |
# File 'app/models/spree/shipping_rate.rb', line 2 def currency @currency end |
#id ⇒ Object
Returns the value of attribute id
2 3 4 |
# File 'app/models/spree/shipping_rate.rb', line 2 def id @id end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'app/models/spree/shipping_rate.rb', line 2 def name @name end |
#shipping_method ⇒ Object
Returns the value of attribute shipping_method
2 3 4 |
# File 'app/models/spree/shipping_rate.rb', line 2 def shipping_method @shipping_method end |