Sha256: 9bba7d0fbc23d55b6f92f14cc9f42f3e2e48cce4fc865b6aecee26c7c9e53fee
Contents?: true
Size: 427 Bytes
Versions: 9
Compression:
Stored size: 427 Bytes
Contents
# frozen_string_literal: true module NovaposhtaApi class Model < Hashie::Trash include Hashie::Extensions::IndifferentAccess include Hashie::Extensions::IgnoreUndeclared class << self def extract_collection(data) NovaposhtaApi::Collection.new(data, self) end def extract_single(data) item = data.is_a?(Array) ? data.first : data new(item) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems