class ButterCMS::Parsers::CategoriesObjects

Public Class Methods

call(categories) click to toggle source

Returns array of category objects created from given array of attributes

@return [Array<ButterCMS::Category>]

# 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