Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/array.rb

Instance Method Summary collapse

Instance Method Details

#first?(el) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/array.rb', line 7

def first? el
  first == el
end

#last?(el) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/array.rb', line 3

def last? el
  last == el
end