Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/influxdb/api/extensions.rb

Instance Method Summary collapse

Instance Method Details

#wrap(object) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/influxdb/api/extensions.rb', line 4

def wrap(object)
  if object.nil?
    []
  elsif object.respond_to?(:to_ary)
    object.to_ary || [object]
  else
    [object]
  end
end