Sha256: 9058eb2060537c17fd6af393414ef218c0ca50194b76801ff327355d1964fa9b

Contents?: true

Size: 250 Bytes

Versions: 1

Compression:

Stored size: 250 Bytes

Contents

class Array
  def to_options_hash
    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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
social_engine-0.0.1 lib/social_engine/core_ext/array.rb