Class: Spree::ShippingRate

Inherits:
Struct
  • Object
show all
Defined in:
app/models/spree/shipping_rate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#costObject

Returns the value of attribute cost

Returns:

  • (Object)

    the current value of cost



2
3
4
# File 'app/models/spree/shipping_rate.rb', line 2

def cost
  @cost
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



2
3
4
# File 'app/models/spree/shipping_rate.rb', line 2

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'app/models/spree/shipping_rate.rb', line 2

def name
  @name
end

#shipping_methodObject

Returns the value of attribute shipping_method

Returns:

  • (Object)

    the current value of shipping_method



2
3
4
# File 'app/models/spree/shipping_rate.rb', line 2

def shipping_method
  @shipping_method
end