Module: RujitsuObject

Defined in:
lib/rujitsu/object.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


6
7
8
# File 'lib/rujitsu/object.rb', line 6

def in? container
  container.respond_to?(:include?) ? container.include?(self) : container == self
end