D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
MatchData
/
Filename :
values_at-i.ri
back
Copy
U:RDoc::AnyMethod[iI"values_at:ETI"MatchData#values_at;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"8Returns match and captures at the given +indexes+, ;TI"&which may include any mixture of:;To:RDoc::Markup::BlankLine o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"Integers.;To;;0; [o; ; [I"Ranges.;To;;0; [o; ; [I"!Names (strings and symbols).;T@o; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [I"7m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie") ;TI":# => #<MatchData "HX1138" 1:"H" 2:"X" 3:"113" 4:"8"> ;TI"7m.values_at(0, 2, -2) # => ["HX1138", "X", "113"] ;TI"0m.values_at(1..2, -1) # => ["H", "X", "8"] ;TI" ;TI"@m = /(?<a>\d+) *(?<op>[+\-*\/]) *(?<b>\d+)/.match("1 + 2") ;TI"2# => #<MatchData "1 + 2" a:"1" op:"+" b:"2"> ;TI"'m.values_at(0, 1..2, :a, :b, :op) ;TI",# => ["1 + 2", "1", "+", "1", "2", "+"];T:@format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I""values_at(*indexes) -> array ;T0[ I"(*args);T@/FI"MatchData;TcRDoc::NormalClass00