Class: Spree::Amazon::Base

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Callbacks, ActiveModel::Naming
Includes:
ActiveModel::AttributeMethods, ActiveModel::Conversion, ActiveModel::MassAssignmentSecurity, ActiveModel::Serialization, ActiveModel::Validations
Defined in:
app/models/spree/amazon/base.rb

Direct Known Subclasses

Asset, Image, Product, Taxon, Taxonomy

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Base



19
20
21
22
# File 'app/models/spree/amazon/base.rb', line 19

def initialize(*args)
  fields = args.extract_options!
  fields.each {|k,v| self.send("#{k}=", v) if self.respond_to?("#{k}=")}
end

Instance Method Details

#attributes=(attrs = { }) ⇒ Object



24
25
26
# File 'app/models/spree/amazon/base.rb', line 24

def attributes=(attrs={ })
  attrs.each {|k,v| self.send("#{k}=", v) if self.respond_to?("#{k}=")}
end

#to_paramObject



28
29
30
# File 'app/models/spree/amazon/base.rb', line 28

def to_param
  @id.to_s
end