A collection of utilities for working with Arrays.
Return a version of the given array with any Symbols contained in it turned into Strings.
# File lib/redleaf/mixins.rb, line 157 157: def stringify_array( array ) 158: return array.collect do |item| 159: case item 160: when Symbol 161: item.to_s 162: when Array 163: stringify_array( item ) 164: else 165: item 166: end 167: end 168: end
Return a version of the given array with any Strings contained in it turned into Symbols.
# File lib/redleaf/mixins.rb, line 173 173: def symbolify_array( array ) 174: return array.collect do |item| 175: case item 176: when String 177: item.to_sym 178: when Array 179: symbolify_array( item ) 180: else 181: item 182: end 183: end 184: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.