Sha256: 8ceab8bff00b0b0fcbd135ed74248d998f9a6d6b7bbf6810530f54b587a4bf51
Contents?: true
Size: 324 Bytes
Versions: 7
Compression:
Stored size: 324 Bytes
Contents
# frozen_string_literal: true module NovaposhtaApi class Collection < SimpleDelegator def initialize(collection, klass) fail StandardError, 'Collection must be a Array' unless collection.is_a? Array @collection = collection.map { |item| klass.new(item) } __setobj__(@collection) end end end
Version data entries
7 entries across 7 versions & 1 rubygems