Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/social_engine/core_ext/array.rb
Instance Method Summary collapse
Instance Method Details
#to_options_hash ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/social_engine/core_ext/array.rb', line 2 def hash = {} self.each do |element| if element.is_a? Symbol hash[element] = {} elsif element.is_a? Hash hash[element.keys[0]] = element.values[0] end end hash end |