Method: TkPhotoImage#cget
- Defined in:
- lib/tk/image.rb
#cget(option) ⇒ Object
Returns the current value of the configuration option given by option. Example, display name of the file from which image was created: puts image.cget :file
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/tk/image.rb', line 215 def cget(option) unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ cget_strict(option) else begin cget_strict(option) rescue => e if current_configinfo.has_key?(option.to_s) # error on known option fail e else # unknown option nil end end end end |