Module: SearchFlip::Helper
- Defined in:
- lib/search_flip/helper.rb
Class Method Summary collapse
Class Method Details
.wrap_array(object) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/search_flip/helper.rb', line 3 def self.wrap_array(object) if object.nil? [] elsif object.respond_to?(:to_ary) object.to_ary || [object] else [object] end end |