class CrateAPI::Items
Items
class which is used to get a set of items from the service.
Constants
- ITEM_ACTIONS
Hash of available actions to take upon the
Items
endpoint.
Public Class Methods
from_array(array)
click to toggle source
Creates an array of Item
objects.
@param [Array] array to be used as the generation source. @return [Array] either an empty array if the input array is nil or a fully inialized array of Item
objects.
# File lib/crate_api/items.rb, line 15 def self.from_array(array) return [] unless array != nil files = Array.new array.each do |file| files.push(Item.new(file)) end return files end