Module: Tk::CoreExtensions::Fixnum

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

Instance Method Summary collapse

Instance Method Details

#tcl_to_ruby(option, hints) ⇒ Object



132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/ffi-tk/core_extensions.rb', line 132

def tcl_to_ruby(option, hints)
  name = option.sub(/^-/, '').to_sym

  if type = hints[name]
    case type
    when :boolean
      Tk.boolean(self)
    else
      self
    end
  end
end

#to_booleanObject



145
146
147
# File 'lib/ffi-tk/core_extensions.rb', line 145

def to_boolean
  Tk.boolean(self)
end