Module: Tk::CoreExtensions::Array
- Defined in:
- lib/ffi-tk/core_extensions.rb
Instance Method Summary collapse
Instance Method Details
#tcl_options_to_hash(hints = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ffi-tk/core_extensions.rb', line 17 def (hints = {}) ::Hash[each_slice(2).map{|key, value| key = key.sub(/^-/, '').to_sym case hint = hints[key] when :boolean [key, Tk.boolean(value)] when :symbol [key, value.to_sym] when :float [key, Float(value)] else [key, value] end }] end |