Class: Spree::Amazon::Taxonomy

Inherits:
Base
  • Object
show all
Extended by:
ActiveModel::Callbacks
Includes:
ActiveModel::AttributeMethods
Defined in:
app/models/spree/amazon/taxonomy.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#attributes=, #initialize, #to_param

Constructor Details

This class inherits a constructor from Spree::Amazon::Base

Instance Attribute Details

#idObject

Returns the value of attribute id



6
7
8
# File 'app/models/spree/amazon/taxonomy.rb', line 6

def id
  @id
end

#nameObject

Returns the value of attribute name



6
7
8
# File 'app/models/spree/amazon/taxonomy.rb', line 6

def name
  @name
end

Class Method Details

.rootsObject



13
14
15
# File 'app/models/spree/amazon/taxonomy.rb', line 13

def roots
  [ new(:id => 1, :name => "Categories") ]
end

Instance Method Details

#rootObject



8
9
10
# File 'app/models/spree/amazon/taxonomy.rb', line 8

def root
  Spree::Amazon::Taxon.root_category
end