Method: Tk::Iwidgets::Hierarchy#insert
- Defined in:
- lib/tkextlib/iwidgets/hierarchy.rb
#insert(index, chars, *tags) ⇒ Object
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/tkextlib/iwidgets/hierarchy.rb', line 304 def insert(index, chars, *) if [0].kind_of? Array # multiple chars-taglist argument :: str, [tag,...], str, [tag,...], ... args = [chars] while .size > 0 args << .shift.collect{|x|_get_eval_string(x)}.join(' ') # taglist args << .shift if .size > 0 # chars end super(index, *args) else # single chars-taglist argument :: str, tag, tag, ... if .size == 0 super(index, chars) else super(index, chars, .collect{|x|_get_eval_string(x)}.join(' ')) end end end |