Class: SeekParty::SeekPartyEngine
- Inherits:
-
Object
- Object
- SeekParty::SeekPartyEngine
- Defined in:
- lib/seek_party/seek_party_engine.rb
Instance Attribute Summary collapse
-
#inspected_class ⇒ Object
Returns the value of attribute inspected_class.
-
#seek_party_attribute ⇒ Object
Returns the value of attribute seek_party_attribute.
-
#seek_party_query ⇒ Object
Returns the value of attribute seek_party_query.
Instance Method Summary collapse
-
#initialize(inspected_class, params: {}, white_list: nil, black_list: nil, scopes: {}) ⇒ SeekPartyEngine
constructor
A new instance of SeekPartyEngine.
- #search ⇒ Object
Constructor Details
#initialize(inspected_class, params: {}, white_list: nil, black_list: nil, scopes: {}) ⇒ SeekPartyEngine
Returns a new instance of SeekPartyEngine.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/seek_party/seek_party_engine.rb', line 7 def initialize(inspected_class, params: {}, white_list: nil, black_list: nil, scopes: {}) @seek_party_attribute = SeekPartyAttribute.new(inspected_class, white_list, black_list) @seek_party_query = SeekPartyQueryBuilder.new(params) @inspected_class = inspected_class @scopes = scopes end |
Instance Attribute Details
#inspected_class ⇒ Object
Returns the value of attribute inspected_class.
3 4 5 |
# File 'lib/seek_party/seek_party_engine.rb', line 3 def inspected_class @inspected_class end |
#seek_party_attribute ⇒ Object
Returns the value of attribute seek_party_attribute.
3 4 5 |
# File 'lib/seek_party/seek_party_engine.rb', line 3 def seek_party_attribute @seek_party_attribute end |
#seek_party_query ⇒ Object
Returns the value of attribute seek_party_query.
3 4 5 |
# File 'lib/seek_party/seek_party_engine.rb', line 3 def seek_party_query @seek_party_query end |
Instance Method Details
#search ⇒ Object
20 21 22 23 24 |
# File 'lib/seek_party/seek_party_engine.rb', line 20 def search spa_attribute = seek_party_attribute.discover_attributes final_query = seek_party_query.build_query(spa_attribute) run_search(final_query) end |