class Object
Public Class Methods
wrap(obj)
click to toggle source
Inspired by Rails's Array.wrap
# File lib/rom/solr/array.rb, line 4 def self.wrap(obj) return [] if obj.nil? return obj.to_ary if obj.respond_to?(:to_ary) Array.new(1, obj) end