Class: ThinkingSphinx::ActiveRecord::AssociationProxy::AttributeMatcher
- Inherits:
-
Object
- Object
- ThinkingSphinx::ActiveRecord::AssociationProxy::AttributeMatcher
- Defined in:
- lib/thinking_sphinx/active_record/association_proxy/attribute_matcher.rb
Instance Method Summary collapse
-
#initialize(attribute, foreign_key) ⇒ AttributeMatcher
constructor
A new instance of AttributeMatcher.
- #matches? ⇒ Boolean
Constructor Details
#initialize(attribute, foreign_key) ⇒ AttributeMatcher
Returns a new instance of AttributeMatcher.
4 5 6 |
# File 'lib/thinking_sphinx/active_record/association_proxy/attribute_matcher.rb', line 4 def initialize(attribute, foreign_key) @attribute, @foreign_key = attribute, foreign_key.to_s end |
Instance Method Details
#matches? ⇒ Boolean
8 9 10 11 12 |
# File 'lib/thinking_sphinx/active_record/association_proxy/attribute_matcher.rb', line 8 def matches? return false if many? column_name_matches? || attribute_name_matches? || multi_singular_match? end |