member?

rng.member?(obj) â true or false
Instance Public methods

Returns true if obj is an element of the range, false otherwise. If begin and end are numeric, comparison is done according to the magnitude of the values.

("a".."z").include?("g")   #=> true
("a".."z").include?("A")   #=> false
("a".."z").include?("cc")  #=> false
doc_ruby_on_rails
2015-05-01 02:00:49
Comments
Leave a Comment

Please login to continue.