Module: SimpleCommandDispatcher::Commands::CommandCallable::Utils
- Defined in:
- lib/simple_command_dispatcher/commands/utils.rb
Class Method Summary collapse
-
.array_wrap(object) ⇒ Object
Borrowed from active_support/core_ext/array/wrap.
Class Method Details
.array_wrap(object) ⇒ Object
Borrowed from active_support/core_ext/array/wrap
8 9 10 11 12 13 14 15 16 |
# File 'lib/simple_command_dispatcher/commands/utils.rb', line 8 def self.array_wrap(object) if object.nil? [] elsif object.respond_to?(:to_ary) object.to_ary || [object] else [object] end end |