Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/rujitsu/object.rb
Instance Method Summary collapse
-
#in?(container) ⇒ Boolean
return true if this object is within the given container if the supplied container does not respond to include? then an equality test is used instead.
Instance Method Details
#in?(container) ⇒ Boolean
return true if this object is within the given container if the supplied container does not respond to include? then an equality test is used instead
4 5 6 |
# File 'lib/rujitsu/object.rb', line 4 def in? container container.respond_to?(:include?) ? container.include?(self) : container == self end |