Method: Array::Hooked::ArrayInterface#keep_if_without_hooks

Defined in:
lib/array/hooked/array_interface.rb

#keep_if_without_hooks { ... } ⇒ Object

Alias to :keep_if that bypasses hooks.

Yields:

  • Block passed to :keep_if.

Returns:

  • (Object)

    Deleted element.



983
984
985
986
987
988
989
990
991
992
993
# File 'lib/array/hooked/array_interface.rb', line 983

def keep_if_without_hooks( & block )

  @without_hooks = true

  keep_if( & block )
  
  @without_hooks = false

  return self

end