Module: Card::Set::Self::Search::HtmlFormat

Extended by:
AbstractFormat
Defined in:
tmpsets/set/mod020-search/self/search.rb

Instance Method Summary collapse

Instance Method Details

#keyword_search_title(keyword) ⇒ Object



37
38
39
# File 'tmpsets/set/mod020-search/self/search.rb', line 37

def keyword_search_title keyword
  %(Search results for: <span class="search-keyword">#{h keyword}</span>)
end

#search_keywordObject



41
42
43
# File 'tmpsets/set/mod020-search/self/search.rb', line 41

def search_keyword
  (vars = search_vars) && vars[:keyword]
end

#search_varsObject



45
46
47
# File 'tmpsets/set/mod020-search/self/search.rb', line 45

def search_vars
  root.respond_to?(:search_params) ? root.search_params[:vars] : search_params[:vars]
end

#wql_search?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'tmpsets/set/mod020-search/self/search.rb', line 49

def wql_search?
  card.keyword_contains_wql? vars: search_vars
end