Module: Realize::Arrays
- Included in:
- Collection::Join, Collection::Sort, Filter::ByKeyRecordValue, Filter::ByKeyValue, Filter::ByKeyValuePresence, Filter::Inactive, Logical::Switch::Case, Type::Array
- Defined in:
- lib/realize/arrays.rb
Overview
Mix-in that adds some nice common array helpers.
Instance Method Summary collapse
Instance Method Details
#array(value) ⇒ Object
13 14 15 |
# File 'lib/realize/arrays.rb', line 13 def array(value) value.is_a?(Hash) ? [value] : Array(value) end |