Class: ButterCMS::Parsers::CategoriesObjects
- Inherits:
-
Object
- Object
- ButterCMS::Parsers::CategoriesObjects
- Defined in:
- lib/butter_cms/parsers/categories_objects.rb
Class Method Summary collapse
-
.call(categories) ⇒ Array<ButterCMS::Category>
Returns array of category objects created from given array of attributes.
Class Method Details
.call(categories) ⇒ Array<ButterCMS::Category>
Returns array of category objects created from given array of attributes
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 |