Class: Object

Inherits:
BasicObject
Defined in:
lib/webget_ramp/object.rb

Instance Method Summary collapse

Instance Method Details

#in?(array) ⇒ Boolean

Syntactic sugar for arrays.

Definition

object.in? array === array.include? object

Example

array=['a','b','c']
object='b'
object.in? array 
=> true

Returns:

  • (Boolean)


14
15
16
# File 'lib/webget_ramp/object.rb', line 14

def in?(array)
  array.include?(self)
end