Sha256: 0fb523c5f9d437f3fc14db8c8b2611c83a5390eed526cf996a296762f5daed96
Contents?: true
Size: 1.11 KB
Versions: 8
Compression:
Stored size: 1.11 KB
Contents
# frozen_string_literal: true module ConvenientService module Examples module Standard module RequestParams module Utils module Array class Wrap < Support::Command ## # @!attribute [r] pad # @return [Object] Can be any type. # attr_reader :object ## # @param object [Object] Can be any type. # @return [void] # def initialize(object) @object = object end ## # @return [Array] # # @internal # Copied without any modifications from: # https://api.rubyonrails.org/classes/Array.html#method-c-wrap # def call if object.nil? [] elsif object.respond_to?(:to_ary) object.to_ary || [object] else [object] end end end end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems