Method: Ruvi::EditorApp#get_binding_hash_key_pair

Defined in:
lib/front.rb

#get_binding_hash_key_pair(initial_options, keys) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/front.rb', line 5

def get_binding_hash_key_pair initial_options, keys
    if keys.is_a? String
        last_char = keys.slice!(-1)
        options = initial_options
        keys.each_byte {
            |b|
            options[b] ||= {}
            options = options[b]
        }
        return options, last_char
    else
        return initial_options, keys
    end
end