names

rxp.names â [name1, name2, ...]
Instance Public methods

Returns a list of names of captures as an array of strings.

/(?<foo>.)(?<bar>.)(?<baz>.)/.names
#=> ["foo", "bar", "baz"]

/(?<foo>.)(?<foo>.)/.names
#=> ["foo"]

/(.)(.)/.names
#=> []
doc_ruby_on_rails
2015-05-05 05:09:59
Comments
Leave a Comment

Please login to continue.