class Category
category.from_array(array) # => Array of Category
objects
Public Class Methods
from_array(array)
click to toggle source
Method from_array
returns array of categories(create from json). Takes value of array objects as json parameter array.
Example:
Category.from_array([...array of JSON objects...]) # => Array of Category
# File lib/models/category.rb, line 21 def self.from_array(array) array.collect do |element| Category.new(element) end end