Module: Tk::CoreExtensions::String

Defined in:
lib/ffi-tk/core_extensions.rb

Instance Method Summary collapse

Instance Method Details

#to_tclObject



101
102
103
# File 'lib/ffi-tk/core_extensions.rb', line 101

def to_tcl
  TclString.new(%("#{gsub(/[\[\]{}$"\\]/, '\\\\\&')}"))
end

#to_tcl_optionObject



105
106
107
# File 'lib/ffi-tk/core_extensions.rb', line 105

def to_tcl_option
  TclString.new(sub(/\A(?=[^-])/, '-'))
end