Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/webget_ramp/object.rb
Instance Method Summary collapse
-
#in?(array) ⇒ Boolean
Syntactic sugar for arrays.
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
14 15 16 |
# File 'lib/webget_ramp/object.rb', line 14 def in?(array) array.include?(self) end |