# File tk/lib/tk/text.rb, line 84 def +(mod) return chars(mod) if mod.kind_of?(Numeric) mod = mod.to_s if mod =~ /^\s*[+-]?\d/ Tk::Text::IndexString.new(String.new(id) << ' + ' << mod) else Tk::Text::IndexString.new(String.new(id) << ' ' << mod) end end
# File tk/lib/tk/text.rb, line 95 def -(mod) return chars(-mod) if mod.kind_of?(Numeric) mod = mod.to_s if mod =~ /^\s*[+-]?\d/ Tk::Text::IndexString.new(String.new(id) << ' - ' << mod) elsif mod =~ /^\s*[-]\s+(\d.*)$/ Tk::Text::IndexString.new(String.new(id) << ' - -' << $1) else Tk::Text::IndexString.new(String.new(id) << ' ' << mod) end end
# File tk/lib/tk/text.rb, line 129 def any_chars(mod) # Tk8.5 feature fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer) if mod < 0 Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' any chars') else Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' any chars') end end
# File tk/lib/tk/text.rb, line 160 def any_indices(mod) # Tk8.5 feature fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer) if mod < 0 Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' any indices') else Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' any indices') end end
# File tk/lib/tk/text.rb, line 191 def any_lines(mod) # Tk8.5 feature fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer) if mod < 0 Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' any_lines') else Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' any lines') end end
# File tk/lib/tk/text.rb, line 108 def chars(mod) fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer) if mod < 0 Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' chars') else Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' chars') end end
# File tk/lib/tk/text.rb, line 118 def display_chars(mod) # Tk8.5 feature fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer) if mod < 0 Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' display chars') else Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' display chars') end end
# File tk/lib/tk/text.rb, line 150 def display_indices(mod) # Tk8.5 feature fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer) if mod < 0 Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' display indices') else Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' display indices') end end
# File tk/lib/tk/text.rb, line 213 def display_lineend # Tk8.5 feature Tk::Text::IndexString.new(String.new(id) << ' display lineend') end
# File tk/lib/tk/text.rb, line 180 def display_lines(mod) # Tk8.5 feature fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer) if mod < 0 Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' display_lines') else Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' display lines') end end
# File tk/lib/tk/text.rb, line 209 def display_linestart # Tk8.5 feature Tk::Text::IndexString.new(String.new(id) << ' display linestart') end
# File tk/lib/tk/text.rb, line 229 def display_wordend # Tk8.5 feature Tk::Text::IndexString.new(String.new(id) << ' display wordend') end
# File tk/lib/tk/text.rb, line 225 def display_wordstart # Tk8.5 feature Tk::Text::IndexString.new(String.new(id) << ' display wordstart') end
# File tk/lib/tk/text.rb, line 140 def indices(mod) # Tk8.5 feature fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer) if mod < 0 Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' indices') else Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' indices') end end
# File tk/lib/tk/text.rb, line 205 def lineend Tk::Text::IndexString.new(String.new(id) << ' lineend') end
# File tk/lib/tk/text.rb, line 170 def lines(mod) fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer) if mod < 0 Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' lines') else Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' lines') end end
# File tk/lib/tk/text.rb, line 202 def linestart Tk::Text::IndexString.new(String.new(id) << ' linestart') end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.