Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/stalkr/ups.rb

Instance Method Summary collapse

Instance Method Details

#to_perly_hashObject



4
5
6
7
8
9
10
11
# File 'lib/stalkr/ups.rb', line 4

def to_perly_hash()
    h = {}
    self.each_index { |i|
        next if i % 2 != 0
        h[ self[i] ] = self[i+1]
    }
    return h
end