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
6 7 8 |
# File 'app/models/calagator/event/search_engine/sql.rb', line 6 def opts @opts end |
#query ⇒ Object
Returns the value of attribute query
6 7 8 |
# File 'app/models/calagator/event/search_engine/sql.rb', line 6 def query @query end |
Class Method Details
.score? ⇒ Boolean
21 22 23 |
# File 'app/models/calagator/event/search_engine/sql.rb', line 21 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.
17 18 19 |
# File 'app/models/calagator/event/search_engine/sql.rb', line 17 def self.search(*args) new(*args).all end |
Instance Method Details
#all ⇒ Object
25 26 27 |
# File 'app/models/calagator/event/search_engine/sql.rb', line 25 def all current_events + past_events end |