Class: DataMapper::SphinxIndex
- Inherits:
-
Object
- Object
- DataMapper::SphinxIndex
- Includes:
- Assertions
- Defined in:
- lib/dm-sphinx-adapter/sphinx_index.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #delta? ⇒ Boolean
-
#initialize(model, name, options = {}) ⇒ SphinxIndex
constructor
A new instance of SphinxIndex.
Constructor Details
#initialize(model, name, options = {}) ⇒ SphinxIndex
Returns a new instance of SphinxIndex.
7 8 9 10 11 12 13 14 15 |
# File 'lib/dm-sphinx-adapter/sphinx_index.rb', line 7 def initialize(model, name, = {}) assert_kind_of 'model', model, Model assert_kind_of 'name', name, Symbol, String assert_kind_of 'options', , Hash @model = model @name = name.to_sym @delta = .fetch(:delta, nil) end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
5 6 7 |
# File 'lib/dm-sphinx-adapter/sphinx_index.rb', line 5 def model @model end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/dm-sphinx-adapter/sphinx_index.rb', line 5 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/dm-sphinx-adapter/sphinx_index.rb', line 5 def @options end |
Instance Method Details
#delta? ⇒ Boolean
17 18 19 |
# File 'lib/dm-sphinx-adapter/sphinx_index.rb', line 17 def delta? !!@delta end |