Class: ReeArray::Wrap
- Inherits:
-
Object
- Object
- ReeArray::Wrap
- Includes:
- Ree::FnDSL
- Defined in:
- lib/ree_lib/packages/ree_array/package/ree_array/functions/wrap.rb
Instance Method Summary collapse
Instance Method Details
#call(object) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/ree_lib/packages/ree_array/package/ree_array/functions/wrap.rb', line 22 def call(object) if object.nil? [] elsif object.is_a?(Array) || object.is_a?(Enumerable) object else [object] end end |