Sha256: 070e444e1052b83e9a47ccda2ce303ec3bbac1bbec329385d6a995c3c281bcde
Contents?: true
Size: 280 Bytes
Versions: 10
Compression:
Stored size: 280 Bytes
Contents
# # Extend the core Array class to include `.wrap` # class Array # Duplication of Ruby on Rails Array#wrap method def self.wrap(object) if object.nil? [] elsif object.respond_to?(:to_ary) object.to_ary || [object] else [object] end end end
Version data entries
10 entries across 10 versions & 1 rubygems