Method: TkPhotoImage#write
- Defined in:
- lib/tk/image.rb
#write(file, *opts) ⇒ Object
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/tk/image.rb', line 378 def write(file, *opts) if opts.size == 0 tk_send('write', file) elsif opts.size == 1 && opts[0].kind_of?(Hash) tk_send('write', file, *_photo_hash_kv(opts[0])) else # for backward compatibility args = opts.collect{|term| if term.kind_of?(String) && term.include?(?\s) term.split else term end }.flatten tk_send('write', file, *args) end self end |