Class: Nephophobia::Util
- Inherits:
-
Object
- Object
- Nephophobia::Util
- Defined in:
- lib/nephophobia/util.rb
Class Method Summary collapse
-
.coerce(obj) ⇒ Object
Wraps a Hash with an Array.
Class Method Details
.coerce(obj) ⇒ Object
Wraps a Hash with an Array.
obj
: The Object to be tested for wrapping.
8 9 10 |
# File 'lib/nephophobia/util.rb', line 8 def self.coerce obj (obj.is_a? Hash) ? [obj] : obj end |