Class: Mongoid::SearchIndexable::Status Private
    Do not use.  This class is for internal use only.
  
| Relationships & Source Files | |
| Inherits: | Object | 
| Defined in: | lib/mongoid/search_indexable.rb | 
Overview
Represents the status of the indexes returned by a search_indexes call.
Class Method Summary
- 
    
      .new(indexes)  ⇒ Status 
    
    constructor
    Internal use only
    Create a new Statusobject.
Instance Attribute Summary
- #indexes ⇒ Array<Hash> readonly Internal use only
- 
    
      #ready  ⇒ Array<Hash> 
    
    readonly
    Internal use only
    Returns the subset of indexes that have status == ‘READY’. 
- 
    
      #ready?  ⇒ true | false 
    
    readonly
    Internal use only
    Returns true if all the given indexes are ‘ready’ and ‘queryable’. 
Instance Method Summary
- 
    
      #pending  ⇒ Array<Hash> 
    
    Internal use only
    Returns the subset of indexes that have status == ‘PENDING’. 
- 
    
      #queryable  ⇒ Array<Hash> 
    
    Internal use only
    Returns the subset of indexes that are marked ‘queryable’. 
Instance Attribute Details
#indexes ⇒ Array<Hash> (readonly)
# File 'lib/mongoid/search_indexable.rb', line 15
attr_reader :indexes
#ready ⇒ Array<Hash> (readonly)
Returns the subset of indexes that have status == ‘READY’
# File 'lib/mongoid/search_indexable.rb', line 27
def ready indexes.select { |i| i['status'] == 'READY' } end
    #ready?  ⇒ true | false  (readonly)
  
Returns true if all the given indexes are ‘ready’ and ‘queryable’.
# File 'lib/mongoid/search_indexable.rb', line 48
def ready? indexes.all? { |i| i['status'] == 'READY' && i['queryable'] } end
Instance Method Details
#pending ⇒ Array<Hash>
Returns the subset of indexes that have status == ‘PENDING’
# File 'lib/mongoid/search_indexable.rb', line 34
def pending indexes.select { |i| i['status'] == 'PENDING' } end
#queryable ⇒ Array<Hash>
Returns the subset of indexes that are marked ‘queryable’
# File 'lib/mongoid/search_indexable.rb', line 41
def queryable indexes.select { |i| i['queryable'] } end