Class: Ferret::Index::SegmentInfo
- Inherits:
-
Object
- Object
- Ferret::Index::SegmentInfo
- Defined in:
- lib/ferret/index/segment_infos.rb
Overview
Holds the info for one segment.
ToDo: Does the dir really need to be stored here?
Instance Attribute Summary collapse
-
#directory ⇒ Object
Returns the value of attribute directory.
-
#doc_count ⇒ Object
Returns the value of attribute doc_count.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize(name, doc_count, dir) ⇒ SegmentInfo
constructor
A new instance of SegmentInfo.
Constructor Details
#initialize(name, doc_count, dir) ⇒ SegmentInfo
Returns a new instance of SegmentInfo.
9 10 11 12 13 |
# File 'lib/ferret/index/segment_infos.rb', line 9 def initialize(name, doc_count, dir) @name = name @doc_count = doc_count @directory = dir end |
Instance Attribute Details
#directory ⇒ Object
Returns the value of attribute directory.
7 8 9 |
# File 'lib/ferret/index/segment_infos.rb', line 7 def directory @directory end |
#doc_count ⇒ Object
Returns the value of attribute doc_count.
7 8 9 |
# File 'lib/ferret/index/segment_infos.rb', line 7 def doc_count @doc_count end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/ferret/index/segment_infos.rb', line 7 def name @name end |
Instance Method Details
#==(o) ⇒ Object
15 16 17 |
# File 'lib/ferret/index/segment_infos.rb', line 15 def ==(o) (o.name == @name and o.doc_count == @doc_count) end |