Class: ButterCMS::Parsers::CategoriesObjects

Inherits:
Object
  • Object
show all
Defined in:
lib/butter_cms/parsers/categories_objects.rb

Class Method Summary collapse

Class Method Details

.call(categories) ⇒ Array<ButterCMS::Category>

Returns array of category objects created from given array of attributes

Returns:



7
8
9
10
11
# File 'lib/butter_cms/parsers/categories_objects.rb', line 7

def self.call(categories)
  categories.map do |category_attributes|
    ::ButterCMS::Category.new(category_attributes)
  end
end