module Corefines::Object::In
@!method in?(other)
@example Array characters = ["Konata", "Kagami", "Tsukasa"] "Konata".in?(characters) # => true @example String "f".in?("flynn") # => true "x".in?("flynn") # => false @param other [#include?] @return [Boolean] +true+ if this object is included in the _other_ object, +false+ otherwise. @raise ArgumentError if the _other_ doesn't respond to +#include?+.
Public Instance Methods
in?(other)
click to toggle source
# File lib/corefines/object.rb, line 166 def in?(other) other.include? self rescue NoMethodError fail ArgumentError, "The parameter passed to #in? must respond to #include?" end