Class: Array

Inherits:
Object show all
Defined in:
lib/gamebox/lib/array_ext.rb

Direct Known Subclasses

Rect

Class Method Summary collapse

Class Method Details

.wrap(thing) ⇒ Object



2
3
4
5
6
7
8
# File 'lib/gamebox/lib/array_ext.rb', line 2

def self.wrap(thing)
  if thing.is_a? Array
    thing
  else
    [thing]
  end
end