module Goo
Constants
- LOG_DOMAIN
Public Class Methods
args_to_hash(args)
click to toggle source
# File lib/goocanvas.rb, line 18 def self.args_to_hash(args) hash = args.pop if args.last.respond_to?(:to_hash) hash ||= Hash.new (args.length/2).times do |i| key_index, value_index = i*2, i*2+1 hash[args[key_index]] = args[value_index] end hash end