Sha256: f6aff24ffdec206adfeb9cc321230e294a59e9195c8b6870a03aa08e1b889ce1

Contents?: true

Size: 387 Bytes

Versions: 6

Compression:

Stored size: 387 Bytes

Contents

class Array

  # CORE OVERRIDE

  if RUBY_VERSION < '1.8.7'

    alias_method :_facets_index, :index

    # Allows #index to accept a block.
    #
    # OVERRIDE! This is one of the bery few core
    # overrides in Facets.
    #
    def index(obj=nil, &block)
      if block_given?
        _facets_index(find(&block))
      else
        _facets_index(obj)
      end
    end

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
facets-2.8.4 lib/core/facets/array/index.rb
facets-2.8.3 lib/core/facets/array/index.rb
facets-2.8.2 lib/core/facets/array/index.rb
facets-2.8.1 lib/core/facets/array/index.rb
facets-2.8.0 lib/core/facets/array/index.rb
facets-2.7.0 lib/core/facets/array/index.rb