Class: Calagator::Event::SearchEngine::Sql
- Inherits:
-
Struct
- Object
- Struct
- Calagator::Event::SearchEngine::Sql
- Defined in:
- app/models/calagator/event/search_engine/sql.rb
Instance Attribute Summary collapse
-
#opts ⇒ Object
Returns the value of attribute opts.
-
#query ⇒ Object
Returns the value of attribute query.
Class Method Summary collapse
- .score? ⇒ Boolean
-
.search(*args) ⇒ Object
Return an Array of non-duplicate Event instances matching the search
query
..
Instance Method Summary collapse
Instance Attribute Details
#opts ⇒ Object
Returns the value of attribute opts
5 6 7 |
# File 'app/models/calagator/event/search_engine/sql.rb', line 5 def opts @opts end |
#query ⇒ Object
Returns the value of attribute query
5 6 7 |
# File 'app/models/calagator/event/search_engine/sql.rb', line 5 def query @query end |
Class Method Details
.score? ⇒ Boolean
20 21 22 |
# File 'app/models/calagator/event/search_engine/sql.rb', line 20 def self.score? false end |
.search(*args) ⇒ Object
Return an Array of non-duplicate Event instances matching the search query
..
Options:
-
:order => How to order the entries? Defaults to :date. Permitted values:
-
:date => Sort by date
-
:name => Sort by event title
-
:title => same as :name
-
:venue => Sort by venue title
-
-
:limit => Maximum number of entries to return. Defaults to 50.
-
:skip_old => Return old entries? Defaults to false.
16 17 18 |
# File 'app/models/calagator/event/search_engine/sql.rb', line 16 def self.search(*args) new(*args).all end |
Instance Method Details
#all ⇒ Object
24 25 26 |
# File 'app/models/calagator/event/search_engine/sql.rb', line 24 def all current_events + past_events end |