Method: Hash.from_array

Defined in:
lib/widget_list/hash.rb

.from_array(array = []) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/widget_list/hash.rb', line 31

def self.from_array(array = [])
  h = Hash.new
  array.size.times do |t|
    h[t] = array[t]
  end
  h
end